# Route Detour & Efficiency Calculator AI Agent Connect

> Route Detour & Efficiency Calculator MCP gives your AI client the math it needs to judge travel performance. It compares actual trip paths against theoretical baselines to calculate detour indices, directness, and spatial deviation. You can use it to audit specific route segments or verify if your logistics data is physically possible.

## Overview
- **Category:** logistics
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_ykNEbHHi8am6Uu54ZTn14HhUJBvFzHJSnJZ9fs8k/ai-agent-connect
- **Tags:** routing, efficiency, distance, spatial, metrics

## Description

You can now give your AI agent the ability to perform precise spatial math on travel data. This MCP acts as a computational engine that compares actual travel paths against a theoretical baseline to find exactly where efficiency is lost. Instead of guessing how much a driver or vehicle strayed from a planned path, you can get hard numbers on detour indices and circuity. 

If you need to dig into a specific part of a trip, you can isolate segments to see where the deviation happened. It also handles the boring stuff like converting distance and time units so your reports stay consistent across different regions. You can even use it to run sanity checks on your data to make sure the routes you are analyzing actually make sense in the real world. It works directly within your existing AI workflows in Claude, Cursor, Windsurf, or VS Code.

## Tools

### convert_route_units
This tool standardizes distance and time measurements. It ensures your reporting stays consistent across different regional formats.

### get_route_efficiency_metrics
This tool calculates primary efficiency indices. It provides the Detour Index, Directness, Circuity, and absolute excess values for a route.

### get_segment_deviation_analysis
This tool inspects specific parts of a trip. It shows exactly how much a single segment deviates from the ideal path.

### validate_route_feasibility
This tool performs a sanity check on your data. It confirms whether the provided route metrics are physically possible.

## Prompt Examples

**Prompt:** 
```
Calculate the efficiency metrics for a route that traveled 120km in 90 minutes with a baseline distance of 100km.
```

**Response:** 
```
The Detour Index is 1.2, the Directness is 0.83, and the excess distance is 20km.
```

**Prompt:** 
```
Is a route with an actual distance of 5km and a baseline distance of 10km feasible?
```

**Response:** 
```
No, the route is infeasible because the actual distance cannot be shorter than the baseline distance.
```

**Prompt:** 
```
Convert 50 miles to kilometers.
```

**Response:** 
```
50 miles is 80.467 kilometers.
```

## Capabilities

### Efficiency Indexing
Your agent calculates Detour Index and Circuity to quantify route performance.

### Spatial Deviation Analysis
Your agent inspects specific trip segments to find where paths strayed from the baseline.

### Data Validation
Your agent checks if route data is physically possible before you run further analysis.

### Unit Standardization
Your agent converts distance and time measurements into your preferred regional formats.

## Use Cases

### Route Auditing
Compare actual driver paths against planned baselines to find excess distance.

### Data Cleaning
Run feasibility checks to catch impossible route data before it hits your database.

### Regional Reporting
Convert distance and time units to match local reporting requirements.

### Performance Benchmarking
Use directness and circuity metrics to compare different transport methods.

## Benefits

- Replaces manual math with direct tool calls to your AI client.
- Identifies specific segments where travel paths deviate from the plan.
- Prevents errors by validating that route data is physically possible.
- Standardizes measurements across different regional formats automatically.

## How It Works

You connect the MCP to your AI client and start asking questions about your route data.

1. Connect the MCP to Claude, Cursor, Windsurf, or VS Code via Vinkius.
2. Provide your route data or trip logs to your AI agent.
3. Ask your agent to calculate metrics, check feasibility, or analyze segments.
4. Your agent calls the specific tool needed to perform the math.
5. Receive the calculated indices or validation results directly in your chat.

## Frequently Asked Questions

**What AI clients can I use with this MCP?**
You can use this MCP with any compatible client, including Claude Desktop, Cursor, Windsurf, and VS Code.

**How does it calculate route efficiency?**
It uses the get_route_efficiency_metrics tool to calculate the Detour Index, Directness, and Circuity by comparing actual paths to a baseline.

**Can it detect errors in my routing data?**
Yes, the validate_route_feasibility tool performs sanity checks to ensure the metrics you provide are physically possible.

**Does it support different measurement systems?**
Yes, the convert_route_units tool allows your agent to standardize distance and time measurements for different regions.

**Can I look at specific parts of a trip?**
Yes, you can use the get_segment_deviation_analysis tool to see how much a specific segment of a route deviates from the ideal path.

**What is the Detour Index?**
The Detour Index is a ratio representing how much more distance is covered compared to the baseline distance. A value of 1.0 indicates the most direct path.

**How can I check if my route data is valid?**
You can use the `validate_route_feasibility` tool to perform a sanity check on route data to ensure the metrics are physically possible.

**Can I convert units like miles to kilometers?**
Yes, the `convert_route_units` tool allows you to standardize distance and time measurements between meters, kilometers, miles, seconds, and minutes.
