Skip to main content
Glama

calculate_route

Read-only

The best order to visit up to 50 stops by road, as a round trip: the stops in visiting order with how long after the start each is reached, and the total drive time and distance. Each stop is {lat, lng} (from a record) or an address (at most 10 addresses a call), with an optional label, id and on-site minutes. Without home_base the trip starts and ends at the first stop. Traffic isn't included. Nothing is saved or assigned — to plan technicians' days, use plan_day_routes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stopsYes1–50 stops
optionsNo
home_baseNoWhere the trip starts and ends (a depot, or the technician's location): an address or {lat, lng}

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false, but the description adds real behavioral context beyond them: traffic is not factored in, results are not persisted or assigned, the 50-stop ceiling, and the 10-address-per-call limit. These are operational traits an agent cannot derive from the annotations or schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense and front-loaded: purpose and return shape come first, then input constraints, then the sibling hand-off. Every sentence carries information, though the opening sentence is long and packs several clauses that could be split.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description carries the return-value burden, and it does so by naming exactly what comes back (ordered stops, time-after-start, total duration and distance). Combined with the limits, defaults, and sibling routing, nothing an agent needs to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 67%, and the description fills key gaps: the 50-stop maximum, the cap of 10 addresses per call, the per-stop optional id/label/service minutes, and the default round-trip behavior when home_base is omitted. Some of this (home_base shape) repeats the schema text, so it is additive but not exhaustive.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (calculate) and resource (route) with the exact deliverable: visiting order, elapsed time per stop, total drive time and distance. It also scopes the operation ('up to 50 stops by road, as a round trip') and names the sibling it is not (plan_day_routes), so an agent can separate it from the other routing tools without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names the alternative ('to plan technicians' days, use plan_day_routes') and states the condition that selects it. It also covers the default mode of operation ('Without home_base the trip starts and ends at the first stop') and the constraint 'Nothing is saved or assigned', leaving little to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.