tfl-ts

v2.17.1
io.github.ghcpuman902/tfl-ts Checked 17 hours ago Published 3 days ago

Read-only Transport for London data: line status, arrivals, journeys, stop lookup.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_supported_modes Supported transport modes

List transport modes bundled with tfl-ts. Static metadata only — no TfL API call.

resolve_line_id Resolve line ID

Resolve a line name to canonical lowercase TfL line IDs. Exact matches rank first. Static metadata only — no TfL API call. Prefer this before get_line_status.

ParameterTypeDescription
query *stringLine name or ID, for example "Central" or "central".
modesarrayOptional mode filter, for example ["tube"].

docs Read tfl-ts docs

Read tfl-ts bundled agent docs offline (same catalogue as `tfl docs`). No TfL API call, no credentials. Prefer list → find → read; use grep to locate symbols across docs. Large files are paginated by line.

ParameterTypeDescription
caseInsensitivebooleanFor operation=grep only.
idstringDoc id or path for operation=read (e.g. "CLAUDE.md", "docs/mcp.md").
limitintegerFor read: max lines (default 80). For grep: max matches (default 50).
offsetintegerFor read: 0-based line offset. For grep: 0-based match offset.
operationstringlist catalogue | read one doc | find by id/title/audience/body | grep content
patternstringFor operation=grep: literal substring (not regex), same as CLI.
querystringFor operation=find: keyword against id, title, audience, or body.

resolve_stop_id Resolve stop ID

Search TfL for a stop name or NaPTAN / SMS code and return compact stop matches. Cached 24h. For modes: ["bus"] this expands 490G… hubs so a street name returns boarding stops, not two raw search hits. Use the returned id with get_arrivals.

ParameterTypeDescription
query *stringStop name or 5-digit bus stop code.
limitinteger
modesarrayOptional mode filter, for example ["tube"] or ["bus"].

get_line_status Line status

Get compact live line status (id, name, status, optional reason). Provide lineIds or modes (at least one). Set issuesOnly=true to hide Good Service lines. Cached 60s.

ParameterTypeDescription
issuesOnlybooleanIf true, return only lines that are not Good Service.
lineIdsarrayCanonical lowercase line IDs, for example ["central"].
modesarrayTransport modes, for example ["tube"].

get_arrivals Live arrivals

Get compact live arrivals for one stop ID: line, towards, minutes, platform. Optional lineIds filter. Cached 15s.

ParameterTypeDescription
stopPointId *stringCanonical stop ID, for example "940GZZLUOXC".
limitinteger
lineIdsarrayOptional filter, for example ["central", "victoria"].

plan_journey Plan a journey

Plan a journey and return a compact summary (duration, fare, natural-language legs). Cached 2 minutes.

ParameterTypeDescription
from *stringOrigin stop ID, postcode, or latitude/longitude.
to *stringDestination stop ID, postcode, or latitude/longitude.
modesarrayOptional modes, for example ["tube", "bus", "walking"].