Skip to main content
Glama

TfL — London Journey Planner

tfl.transit.journey_plan
Read-onlyIdempotent

Plan a multi-modal journey between any two London locations using the TfL journey planner. Accepts free-text addresses, NAPTAN stop IDs, ICS station codes, or lat/lon coordinates as origin and destination. Returns up to 3 journey options with legs, modes (tube, bus, walking, overground, etc.), departure/arrival times, and turn-by-turn summaries. Optionally specify preferred modes (e.g. tube,bus), date (YYYYMMDD), and time (HHMM) for departing or arriving at a specific time. Covers all TfL services: Tube, Overground, Elizabeth line, DLR, bus, tram, river bus, and walking. Source: TfL Unified API — api.tfl.gov.uk. No auth required, TfL Open Data CC-BY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesJourney destination — accepts NAPTAN IDs, ICS codes, lat/lon pairs, or free-text location names (e.g. Heathrow Terminal 5, Canary Wharf, Waterloo).
dateNoJourney date in YYYYMMDD format (e.g. 20250710). Defaults to today. Used together with time to find departures or arrivals at that datetime.
fromYesJourney origin — accepts NAPTAN IDs (940GZZLUKSX), ICS codes (1000008), lat/lon pairs (51.509,-0.128), or free-text location names (e.g. Kings Cross, Victoria, London Bridge).
modeNoComma-separated preferred transport modes for the journey (e.g. tube,bus,walking or tube,overground,elizabeth-line). Defaults to all available TfL modes including walking.
timeNoJourney time in HHMM 24-hour format (e.g. 0830, 1730). Defaults to current time. Interpreted as departure time unless time_is is set to Arriving.
limitNoMaximum number of journey options to return (1–5). Defaults to 3.
time_isNoWhether the time parameter represents a departure or arrival time (Departing or Arriving). Defaults to Departing.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent only when the call failed. Includes error code, message, request_id, and any provider-specific extras.
resultNoTool response payload. Shape varies per tool — consult the tool description and inputSchema. May be an object, array, string, or number depending on the upstream provider response.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already indicate read-only, idempotent, and non-destructive behavior dna. The description adds valuable behavioral context beyond annotations: return limit (up to 3 journey options), accepted input formats (free-text, NAPTAN, ICS, lat/lon), supported modes, and no authentication required. It does not contradict annotations, and the additional details help an agent understand what the tool does without opening the schema.

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

Conciseness5/5

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

The description is appropriately sized and front-loaded: it opens with the purpose, then lists inputs, outputs, optional parameters, coverage, and source/auth in a logical sequence. Every sentence contributes distinct information, with no filler or redundancy. It is concise despite providing comprehensive details.

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 7-parameter tool with a rich output schema, the description is fully complete. It covers the purpose, input flexibility, output structure, optional parameters, service coverage, and authentication requirements. With an output schema present, there is no need to describe return values in the description, and the available information is sufficient for correct invocation.

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 each parameter's description is already detailed (e.g., 'from' and 'to' accept NAPTAN IDs, ICS codes, lat/lon pairs, free-text). The tool description repeats some of this info (e.g., preferred modes, date/time format) but does not add significant new meaning beyond the schema. Baseline 3 is appropriate; the description does not need to compensate for schema gaps.

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 description states a specific verb and resource: 'Plan a multi-modal journey between any two London locations using the TfL journey planner.' It clearly distinguishes itself from sibling TfL tools (arrivals, bike points, line status) by focusing on journey planning. The input types and output are explicitly described, making the tool's purpose unmistakable.

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?

The description provides clear context for when to use the tool (planning a journey) and describes what it covers (all TfL services). However, it does not explicitly name alternative tools or conditions for when NOT to use it. While the purpose is distinct enough for an agent to infer, there is no explicit exclusion statement as seen in the high-calibration example.

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.