Skip to main content
Glama

Spick Me — Swiss public transport

Public-transport travel times between many origins and destinations

travel_time_matrix
Read-onlyIdempotent

Compute the public-transport travel time in minutes from each of several origins to each of several destinations in Switzerland, for one departure time. One search per origin, however many destinations — built for comparing locations: which office site is best reached from where staff live, which flat has the shortest commutes, how well a venue is connected.

Use it when there are several places on either side. For one pair with the actual connection, use plan_journey; for everywhere reachable, reachable_area.

Inputs: origins and destinations are lists of places, each A station or stop name ("Zürich HB", "Bern", "Lausanne, Flon"), an address ("Bahnhofstrasse 1, Winterthur"), a named place ("ETH Zürich", "Kunsthaus"), a coordinate as "geo:47.3769,8.5417", or a place_id returned by find_place ("stop:8503000"). Names are read the way a rider types them; an ambiguous name returns candidates instead of a guess. (addresses and coordinates are snapped to their nearest stop, named in the answer). departure: Swiss local time in ISO 8601, e.g. "2026-09-26T08:00"; an explicit offset or Z is converted. A bare "08:00" means today (tomorrow if it has long passed). Omit for now. max_transfers caps changes.

The answer is minutes[i][j] from origins[i] to destinations[j], waiting for the first vehicle included, or null where no connection exists that day. Planned timetable; live delays are not included.

Example: {"origins": ["Winterthur", "Baden", "Zug"], "destinations": ["Zürich HB", "Zürich Oerlikon"], "departure": "2026-09-28T07:30"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
originsYesWhere each row of the matrix starts.
departureNoWhen to leave. Omit for now.
destinationsYesWhere each column of the matrix ends.
max_transfersNoThe most changes of vehicle allowed.
transfer_time_factorNoHow much time to allow for changing trains, as a multiple of the timetable's minimum change times: 1 (default) is the timetable's own; 1.5 for luggage, children or reduced mobility; 0.7 for a fast walker. Between 0.5 and 3.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
minutesYes
originsYes
departureNo
destinationsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly, idempotent, non-destructive), so the bar is lower, yet the description adds real operational context: one search per origin regardless of destination count (cost shape), ambiguous names return candidates rather than guessing, addresses/coordinates are snapped to their nearest stop, planned timetable only with no live delays, and null where no connection exists.

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?

Front-loaded with the core operation, then cleanly segmented into usage, inputs, output, and a worked example. Dense and well organized, though the illustrative 'which office site / which flat / how well a venue is connected' clause is mildly redundant with the preceding 'built for comparing locations'.

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?

For a 5-parameter, open-world, computed tool with an output schema, the description still supplies the return semantics (minutes[i][j], waiting for the first vehicle included, null for no connection) and the timetable caveat. Nothing needed to invoke it correctly is missing; transfer_time_factor is left to the schema, which documents it thoroughly.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds meaning the schema lacks: the full accepted place grammar (stop name, address, named place, 'geo:lat,lon', find_place place_id), departure-time parsing rules (ISO 8601, offsets/Z converted, bare '08:00' means today or tomorrow if long past, omit for now), and the row/column meaning of the answer. This goes well beyond the terse schema strings.

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+resource ('compute the public-transport travel time... from each of several origins to each of several destinations'), plus scope (Switzerland, one departure time) and the matrix shape. It explicitly distinguishes itself from plan_journey and reachable_area, so an agent can route correctly 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?

'Use it when there are several places on either side' gives the positive condition, and it names the two alternatives with their selecting conditions: plan_journey for one pair with the actual connection, reachable_area for everywhere reachable. That is explicit when-to-use plus when-not-to-use routing.

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.

Resources