Skip to main content
Glama

Calculate Route

calculate_route
Read-only

Calculates a route between two or more locations via ANWB for car, caravan, bike, or pedestrian travel, returning distance, duration, turn-by-turn directions, toll data, and alternatives.

Instructions

Calculate a route between two or more locations using ANWB route planning. Supports car, caravan, bike, and pedestrian modes. Provide locations as latitude,longitude pairs separated by colons (e.g. '52.37,4.89:51.44,5.47'). Returns distance, duration, turn-by-turn directions, toll information (car/caravan only), and optional alternative routes. Use find_locations first to get coordinates for place names.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "locations": "<locations>"
    },
    "name": "calculate_route"
  }
}

Input Schema

NameRequiredDescriptionDefault
avoidNoRoad types to avoid. Options: tollRoads, motorways, ferries, unpavedRoads. Applies to car/caravan modes primarily.
trafficNoTake current traffic conditions into account (car/caravan mode only, ignored for bike/pedestrian).
tollInfoNoInclude toll road information (car/caravan mode only, ignored for bike/pedestrian).
locationsYesWaypoints as lat,lon pairs separated by colons. Minimum 2 points. Example: '52.373166,4.89066:51.441643,5.469722' (Amsterdam to Eindhoven).
routeTypeNoRoute optimization: fastest (default) or shortest distance. Note: 'shortest' only works for bike and pedestrian modes.fastest
transportModeNoTransport mode: car (default), caravan, bike, or pedestrian.car
transportSubtypeNoBike subtype: 'bike' (regular) or 'ebike' (electric bicycle). Only applies when transportMode is 'bike'.
includeAlternativesNoInclude alternative routes in the response.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.1
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observedv0.2.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered; the description adds genuinely new behavioral context by listing what comes back (distance, duration, turn-by-turn directions, toll info, alternatives) and where mode constraints bite (toll info car/caravan only). It does not mention rate limits, failure modes for invalid coordinates, or response size for long multi-waypoint routes.

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?

Five tight sentences, front-loaded with purpose and modes, then input format, then returns, then the find_locations pointer. No sentence is wasted, though the input-format example partially duplicates the schema's own example.

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

Completeness4/5

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

With eight parameters, three enums, and no output schema, the description does the necessary extra work by enumerating return fields and the prerequisite call. The only real omission is any hint about behavior with more than two waypoints or about mode-specific limits beyond the two it names.

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

Parameters3/5

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

Schema description coverage is 100%, and the schema already documents avoid, traffic, tollInfo, routeType, transportMode, transportSubtype, includeAlternatives, and the locations format in detail. The description only restates the lat,lon colon-separated format with an example, adding marginal meaning beyond the structured fields, so the baseline 3 applies.

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?

The definition names a specific verb and resource ("Calculate a route between two or more locations") and immediately scopes it by provider and transport modes (ANWB; car, caravan, bike, pedestrian). The enumerated mode list functionally separates it from an EV-specific routing sibling without the agent needing to open either schema.

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

Usage Guidelines4/5

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

It gives a concrete prerequisite — call find_locations first when starting from place names — which is real routing guidance, not filler. It stops short of stating when not to use it (e.g., a dedicated alternative for EV routing) or what happens if fewer than two waypoints are supplied.

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