# jp-train-transfer-minimizer AI Agent Connect

> Calculate precise Japanese train route metrics including transfer penalties.

## Overview
- **Category:** travel
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_lHcL509wZHy0YK9Y4QbfUtrhlfnYJj7oEWkVFWHI/ai-agent-connect
- **Tags:** japan, train, route, travel-planner, metrics

## Description

This MCP server provides deterministic tools to evaluate Japanese train routes. It calculates total travel time, the number of transfers, and a specific transfer penalty to determine the effective travel time. Use `calculate_route_metrics` to get a full breakdown of a journey, `compare_route_efficiency` to decide between two different paths, or `validate_segment_integrity` to verify individual route segments.

## Tools

### calculate_route_metrics


### compare_route_efficiency


### validate_segment_integrity


## Prompt Examples

**Prompt:** 
```
Calculate the metrics for a route with two segments: Yamanote Line for 15 minutes (no transfer) and Chuo Line for 20 minutes (requires transfer).
```

**Response:** 
```
Total travel time is 35 minutes, total transfers is 1, transfer penalty is 5 minutes, and effective travel time is 40 minutes.
```

**Prompt:** 
```
Which route is better: Route A (30 mins, 0 transfers) or Route B (20 mins, 2 transfers)?
```

**Response:** 
```
Route A is better. Route A has an effective travel time of 30 minutes, while Route B has an effective travel time of 30 minutes. Since effective times are equal, Route A is better because it has fewer transfers.
```

**Prompt:** 
```
Check if this segment is valid: { "lineName": "Shinkansen", "travelTimeMin": 120, "transferRequired": false }
```

**Response:** 
```
The segment is valid.
```

## Frequently Asked Questions

**How is the transfer penalty calculated?**
The transfer penalty is calculated by multiplying the total number of transfers by 5 minutes, representing the average time spent walking and waiting.

**Can I compare two different routes?**
Yes, you can use the `compare_route_efficiency` tool to determine which route is better based on effective travel time.

**What is effective travel time?**
Effective travel time is the sum of the actual time spent on trains and the calculated transfer penalty.
