# TollGuru Alternative MCP

> TollGuru Alternative MCP Server calculates global toll costs and fuel estimates using your AI agent. Submit data via address, GPS coordinates, encoded polyline strings, or full trip tracks. Supports multi-vehicle types (Auto, Truck, Taxi) and gives detailed breakdowns for logistics planning.

## Overview
- **Category:** data-analytics
- **Price:** Free
- **Tags:** toll-calculation, route-optimization, fleet-management, fuel-estimation, logistics-intelligence, transportation-costs

## Description

You’re trying to figure out the cost of a trip across state lines or even continents. You gotta know what it's gonna cost in fuel and tolls before you leave. This server connects your AI client directly to global toll intelligence, so you don't have to manually check maps or run separate calculations for every single segment. It handles complex logistics analysis through natural conversation.

When you use this toolset, your agent figures out the total cost of a trip—including gas and tolls—and it can even audit individual charges at specific toll booths. You can factor in vehicle size, whether you're running an auto, a taxi, or a five-axle truck. It’s built to process data no matter how messy your source is.

**Calculating Costs by Location:**

If you know the start and end points using standard street addresses, use `calculate_tolls_by_address`. This tool gives you an estimate for both fuel costs and total tolls between any two specified locations while supporting multiple vehicle types. When your starting and ending points are known only by GPS coordinates, run `calculate_tolls_by_coordinates`. It compares several route options and provides a full cost breakdown of the expected tolls. If you're working with an exact path defined by its encoded polyline string, use `calculate_tolls_by_polyline` to determine that precise toll segment cost.

**Analyzing Full Trip Data:**

For auditing purposes, if you have a raw log—a full trip’s worth of recorded GPS track data—use `calculate_tolls_by_gps`. This reconciles the entire dataset against known toll charges, giving you final post-trip billing costs. When you just need to check the specific rates for one place, call `get_toll_rates` and pass in a single, named toll plaza or booth; it pulls up that detailed rate structure.

**Monitoring Usage:**

For your internal accounting, use `get_transaction_count`. It returns the total number of API transactions processed against your account usage so you know exactly where you stand on billing.

## Tools

### calculate_tolls_by_address
Calculates estimated tolls and fuel costs between two specified addresses, supporting multiple vehicle types.

### calculate_tolls_by_coordinates
Compares multiple route options and breaks down the toll cost when provided with start and end GPS coordinates.

### calculate_tolls_by_gps
Reconciles a full trip's worth of raw GPS track data to determine final, post-trip toll costs.

### calculate_tolls_by_polyline
Calculates the precise toll cost for an exact route segment by submitting its encoded polyline string.

### get_toll_rates
Retrieves the current, detailed rate structure for a single, named toll plaza or booth.

### get_transaction_count
Gets the total number of API transactions processed against your account usage.

## Prompt Examples

**Prompt:** 
```
Calculate tolls from New York to Philadelphia for a standard car.
```

**Response:** 
```
Retrieving route costs from NYC to Philly... For a 2-axle auto, the total toll cost is approximately $25.50 using a tag or $32.00 in cash. I can list the individual tolls like the Holland Tunnel and NJ Turnpike.
```

**Prompt:** 
```
What is the cheapest route from San Francisco to Los Angeles considering tolls?
```

**Response:** 
```
Analyzing routes between SF and LA... I've found a path with zero tolls taking the I-5 S, though it may take slightly longer. The alternative route via the coastal highway has $15 in bridge tolls. Which one do you prefer?
```

**Prompt:** 
```
How much does a 5-axle truck pay in tolls from Chicago to Miami?
```

**Response:** 
```
Fetching heavy vehicle rates for the Chicago-Miami corridor... For a 5-axle truck, the total estimated toll cost is $145.00. I have the breakdown of state-by-state charges and tag vs cash options ready for you.
```

## Capabilities

### Calculate costs using two addresses
Determines the estimated fuel and total toll cost between any starting point and endpoint.

### Analyze routes via coordinates
Compares multiple route options and provides a full breakdown of tolls when given start/end GPS pairs.

### Audit post-trip GPS tracks
Takes raw, recorded trip data (GPS track) and reconciles it against known toll charges for billing purposes.

### Calculate costs for an exact path
Determines the precise cost of a route segment by submitting its encoded polyline string.

### Look up specific rate structures
Retrieves detailed toll rates for individual, named toll plazas or booths.

### Monitor usage volume
Returns the total number of API transactions processed for your account billing records.

## Use Cases

### Planning a cross-state deployment
A logistics manager needs the cheapest way from Dallas to Miami. They ask their agent: 'What is the lowest cost route considering tolls and fuel?' The agent uses `calculate_tolls_by_address` and returns multiple options, letting the manager pick the most profitable path.

### Auditing a delivery day's expenses
A field engineer finishes a route and uploads the full GPS track. The agent uses `calculate_tolls_by_gps` to process the raw data, giving an exact total toll bill that matches the receipts, eliminating manual spreadsheet work.

### Checking specific bridge fees
A financial controller needs to verify a single-segment charge. They ask: 'What is the rate at the Golden Gate Bridge?' The agent uses `get_toll_rates` to pull up the exact, current fee structure instantly.

### Calculating for an encoded path
A specialized mapping tool generates a precise polyline string for a segment. Instead of converting it back to coordinates, the developer uses `calculate_tolls_by_polyline` to get immediate cost analysis for that exact geometry.

## Benefits

- Pinpoint the total cost of a trip. Instead of guessing, you get an immediate estimate of tolls plus fuel for any given route by using `calculate_tolls_by_address` or `calculate_tolls_by_coordinates`. This prevents budget overruns before the trucks even leave the yard.
- Handle real-world data complexity. If you have raw trip logs, don't guess the costs. Use `calculate_tolls_by_gps` to reconcile actual expenses against the recorded GPS tracks, making auditing simple and reliable.
- Adapt for specific needs. Need to know if a 5-axle truck or a standard car is going through? Run the same calculation multiple times while specifying different vehicle types in any of the `calculate_tolls_by_*` tools. The pricing changes instantly.
- Verify individual segments. Sometimes you only care about one bridge or tunnel. Use `get_toll_rates` to look up the specific cost structure for a single toll plaza, giving you granular control over billing checks.
- Optimize based on input type. If you have a simple start/end point, use addresses. If you are already mapping coordinates, switch to `calculate_tolls_by_coordinates` or `calculate_tolls_by_polyline` for maximum precision.

## How It Works

The bottom line is your AI client gets back actionable financial data: the exact estimated costs for any given journey or recorded trip segment.

1. First, subscribe to the server and input your required TollGuru API Key into your AI client.
2. Next, instruct your agent on which calculation method to use (e.g., 'Calculate costs from these coordinates' or 'Use this address pair').
3. The agent invokes the specialized tool, sends the data payload, and returns a structured report detailing total tolls, fuel estimates, and cost options.

## Frequently Asked Questions

**How do I calculate tolls using TollGuru Alternative MCP Server?**
You give your agent the start and end points, specifying if they are addresses or coordinates. The server then calculates multiple route options with cost breakdowns.

**Is `calculate_tolls_by_gps` better than using addresses?**
`calculate_tolls_by_gps` is for auditing. It takes a full, recorded track of a trip—like data from an onboard device—to reconcile what actually happened on the road, not just planning.

**Can I find the rate for one specific toll booth using TollGuru Alternative?**
Yes. Use the `get_toll_rates` tool. This lets you look up the current fee structure for a single named plaza or bridge, which is useful for detailed financial checks.

**Does the server support different truck sizes?**
Yes, all calculation functions (`calculate_tolls_by_*`) allow you to specify vehicle types (Auto, Taxi, Truck). This ensures the toll and fuel estimate is accurate for your specific equipment.

**What if I only have an encoded polyline?**
Use `calculate_tolls_by_polyline`. It takes this highly precise string format to calculate tolls exactly along that path, which is ideal when other location data fails or is too coarse.

**Using `get_transaction_count`, how do I monitor my API usage and billing limits?**
The `get_transaction_count` tool lets you check your total accumulated transaction count. It’s crucial for monitoring consumption, especially when building high-volume applications or scaling up your fleet management tools.

**Before running `calculate_tolls_by_address`, what credentials do I need to authenticate my requests?**
You must provide a valid API key upon initial server setup. This unique credential authenticates every request, ensuring the calculated route costs and fuel estimates are correctly tied to your account.

**When using `calculate_tolls_by_coordinates`, does the server account for changes between state jurisdictions?**
Yes. The system processes tolling across different geographic jurisdictions automatically. This guarantees accurate pricing regardless of how many state or county lines your calculated route crosses.

**Can I calculate tolls for multiple vehicle types like cars and trucks?**
Yes! All toll calculation tools (`calculate_tolls_by_address`, `calculate_tolls_by_coordinates`, `calculate_tolls_by_polyline`, `calculate_tolls_by_gps`) accept a `vehicle_type` parameter. Supported types include `2AxlesAuto`, `2AxlesTaxi`, `2AxlesMotorcycle`, `3AxlesTruck`, and up to 9-axle configurations.

**Does the result show both cash and electronic tag prices?**
Absolutely. The `TollPresenter` displays the costs for different payment methods whenever available from the API, allowing you to choose the best option.

**What addresses should I use for origin and destination?**
You can provide full physical addresses, city names, or even specific coordinates. The more precise the address, the more accurate the toll calculation will be.