mcp-lad-lviv-ua
This server is a read-only MCP API for Lviv public transport data, letting you search stops, get live arrivals/vehicle positions, explore routes, and render transit maps.
Search stops by name or query with inflection-tolerant matching (
search_stops).Find stops near a location with distance and serving routes (
get_stops_around_location).Get live arrivals at a stop with ETAs, vehicle positions, and map/arrival-list UI blocks (
get_stop_realtime).Get static route info — stop lists, schedules, colors, and optional route polylines (
get_route_static).Get live vehicles on a route with destinations and next-stop ETAs (
get_route_realtime).Find direct routes between two stops with walking distances to/from stops (
find_routes_between— mentioned in README).Find nearby live vehicles and get detailed info about a specific vehicle (
get_nearby_vehicles,get_vehicle_info).Get static stop/route geometry and metadata for map enrichment without live data (
get_stop_geometry).Access reference resources like
timetable://about,timetable://stop/{code}, andtimetable://route/{name}.Use prompt templates (
transit-map-view,transit-arrival-list,transit-hybrid-view) for standardized rendering workflows.
Timetable API Node
Express-based API for Lviv transport timetable data with a read-only MCP endpoint.
Requirements
Node.js 26 (see
.nvmrc)
Related MCP server: GTFOBins MCP Server
Run locally
nvm use
make startTest
nvm use && make testMonitoring
Two optional integrations, both off unless their environment variable is set:
Variable | Effect |
| Error reporting via |
| New Relic APM via |
New Relic runs as a preloaded agent, so npm start carries the flags:
node -r dotenv/config -r newrelic --import newrelic/esm-loader.mjs index.jsdotenv/config is preloaded first so .env is populated before the agent
reads its configuration. The config file is newrelic.cjs (the agent is
CommonJS and this project is ESM) and holds no secrets — the key comes from the
environment. /health is excluded from transactions via rules.ignore.
The account is in the EU region; its license key starts with eu01xx and
the agent picks the collector from that prefix. Use the 40-character ingest
license key, not an NRAK-... user API key.
Cloud Run reads the key from Secret Manager:
gcloud run services update timetable-api-node --region=us-central1 --project=timetable-252615 --set-secrets=NEW_RELIC_LICENSE_KEY=new-relic-license-key:latestMCP Server
This service exposes a public read-only MCP endpoint over Streamable HTTP.
MCP endpoint:
/mcpServer card:
/.well-known/mcp/server-card.jsonDiscovery hint:
/robots.txt(non-standard comment hint)
Production deployment (see cloudbuild.yaml for Cloud Run) serves REST and MCP from api.lad.lviv.ua. The main site lad.lviv.ua is the public transport website (this repo still links there in HTML sitemap and tables for people, not for the API host). Use your own origin when running locally.
LLM and /mcp flow
An MCP client (Claude, Cursor, or the MCP SDK) talks JSON-RPC over Streamable HTTP to POST /mcp. Tool handlers reuse the same Express actions as the REST API, backed by LokiJS timetable data, GTFS SQLite (via gtfs), and live GTFS-RT feeds (for example track.ua-gis.com).
graph LR;
Client[LLM or MCP client] -->|JSON-RPC Streamable HTTP| Mcp["POST /mcp"];
Mcp --> Tools[Tool handlers];
Tools --> Actions[Express actions];
Actions --> Loki[(LokiJS)];
Actions --> Gtfs[(GTFS SQLite)];
Actions --> Rt[GTFS-RT upstream];
Loki --> Actions;
Gtfs --> Actions;
Rt --> Actions;
Actions --> Tools;
Tools --> Mcp;
Mcp -->|MCP tool result| Client;Try the live API
MCP Inspector (local): run npx @modelcontextprotocol/inspector, then open the UI with transport and server URL prefilled (from the inspector README):
http://localhost:6274/?transport=streamable-http&serverUrl=https%3A%2F%2Fapi.lad.lviv.ua%2Fmcp
POST https://api.lad.lviv.ua/mcp with Content-Type: application/json and Accept: application/json, text/event-stream — the Streamable HTTP transport rejects a request that does not accept both. The server is stateless: there is no session, so tools/call works on its own without an initialize first. The response arrives as a single SSE event: message frame carrying the JSON-RPC result.
curl -s https://api.lad.lviv.ua/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_stop_realtime","arguments":{"stop_id":101}}}'Example tools/call body shape:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_stop_realtime",
"arguments": { "stop_id": 101 }
}
}Successful tool responses return a natural-language text summary inside MCP content items (type: "text") — e.g. "Stop «Площа Ринок»: 6 arrivals. Next: Т02 → «Пасічна» in 3 min." The full structured payload is in the structuredContent field (for schema-aware clients). Each structuredContent payload follows one contract:
{
"view": "transit_realtime",
"data": { "...": "tool-specific payload" },
"ui_blocks": [
{ "type": "map", "data": { "center": [49.84, 24.03], "zoom": 14, "layers": { "stops": "data.stop", "vehicles": "data.arrivals" } } },
{ "type": "arrival_list", "data": { "source": "data.arrivals" } }
]
}ui_blocks point into data instead of repeating it. A map block gives the centre and zoom, and layers maps stops, vehicles and polylines to a dot path in the result; every stop and vehicle there has lat/lng, vehicles also bearing. An arrival_list block names the arrivals array to render, already sorted by arrival_minutes (null = no ETA).
Exposed tools
All tools are read-only. Stop IDs are the numeric codes on stop signs, returned as strings ("707"). Route names are the short names on vehicles ("Т30", "А1"); Latin "T30"/"A01" work too, and a bare number is read as an internal route ID. An unknown route or vehicle returns isError: true with a hint on what to pass instead.
Tool | Arguments | Returns |
|
| Stops whose Ukrainian or English name contains every query word (inflection-tolerant: |
|
| Stops near a point, nearest first, with |
|
| Live arrivals: |
|
| Direct routes within a 300 m walk of each end, best first: |
|
| Name, type, colour, stop lists for both directions, first-stop timetable; polylines only on request. |
|
| Vehicles on the route with |
|
| Live vehicles nearest first, with |
|
| One vehicle: position, route, |
{
"view": "transit_realtime",
"data": {
"stop": { "id": "61", "name": "Площа Ринок", "lat": 49.84146, "lng": 24.03227 },
"arrivals": [
{
"route": "Т02",
"direction": "Пасічна",
"vehicle_type": "tram",
"arrival_minutes": 3,
"vehicle_id": "2393",
"lat": 49.83461,
"lng": 24.01672,
"bearing": 60
}
],
"updated_at": "2026-09-23T09:01:21Z"
},
"ui_blocks": [
{
"type": "map",
"data": { "center": [49.84146, 24.03227], "zoom": 14, "layers": { "stops": "data.stop", "vehicles": "data.arrivals" } }
},
{ "type": "arrival_list", "data": { "source": "data.arrivals" } }
]
}{
"view": "transit_realtime",
"data": {
"query": "rynok",
"stops": [
{
"id": "61",
"name": "Площа Ринок",
"lat": 49.84146,
"lng": 24.03227,
"eng_name": "Rynok square",
"routes": ["Т01", "Т02"]
}
],
"updated_at": "2026-09-23T09:36:53Z"
},
"ui_blocks": [
{ "type": "map", "data": { "center": [49.84146, 24.03227], "zoom": 14, "layers": { "stops": "data.stops" } } }
]
}One stop name usually covers both sides of the street under different IDs; each is returned, and routes tells them apart. get_stops_around_location returns the same stop objects plus distance_meters.
Text summary: "3 direct routes «Площа Ринок» → «Залізничний вокзал». Best: Т01 towards «Залізничний вокзал», 8 stops, board at «Руська» (137m walk)."
{
"view": "transit_realtime",
"data": {
"from": { "id": "61", "name": "Площа Ринок", "stop_ids": ["10", "57", "58", "59", "61", "63", "855"] },
"to": { "id": "118", "name": "Залізничний вокзал", "stop_ids": ["117", "118", "188", "189", "190", "191"] },
"options": [
{
"route": "Т01",
"vehicle_type": "tram",
"direction": 0,
"destination": "Залізничний вокзал",
"board_stop": { "id": "58", "name": "Руська", "lat": 49.84186, "lng": 24.03408 },
"alight_stop": { "id": "118", "name": "Залізничний вокзал", "lat": 49.839, "lng": 23.99677 },
"stops_count": 8,
"walk_to_board_meters": 137,
"walk_from_alight_meters": 0
}
],
"updated_at": "2026-09-23T09:36:53Z"
},
"ui_blocks": []
}Each end covers every stop within a 300 m walk (stop_ids): a line's two directions often stop on opposite sides of a street under different names, as here, where Т01 towards the station leaves from «Руська», not «Площа Ринок». Options are ranked by stops plus walking (150 m of walking weighs as one stop), one per route and direction. A direction's last stop counts as a place to get off, not to board. Only direct routes are listed; an empty options means a transfer is needed.
{
"view": "transit_realtime",
"data": {
"route": { "name": "Т30", "long_name": "Університет - Городоцька - вул. Ряшівська", "color": "#EF88AA", "type": "trolleybus" },
"stops": [
[
{
"id": "101", "name": "Університет", "lat": 49.841, "lng": 24.003,
"departures": ["05:30", "05:52"],
"schedule": { "workday": ["05:30", "05:52", "06:10"], "weekend": ["07:00", "07:30"] }
},
{ "id": "707", "name": "Стадіон Сільмаш", "lat": 49.838, "lng": 24.021, "departures": [], "schedule": { "workday": [], "weekend": [] } }
],
[
{ "id": "707", "name": "Стадіон Сільмаш", "lat": 49.838, "lng": 24.021, "departures": ["06:00"], "schedule": { "workday": ["06:00"], "weekend": [] } }
]
],
"updated_at": "2026-09-23T09:01:12Z"
},
"ui_blocks": [
{ "type": "map", "data": { "center": [49.841, 24.003], "zoom": 13, "layers": { "stops": "data.stops" } } }
]
}stops[0] is direction 0 (outbound), stops[1] direction 1 (return). departures and schedule are populated for the first stop of each direction; other stops have empty arrays. schedule.workday is Monday–Friday, schedule.weekend Saturday–Sunday; departures keeps today's schedule for backward compatibility. With include_shapes: true, data.shapes holds one [lat, lng] polyline per direction and the map block adds "polylines": "data.shapes".
{
"view": "transit_realtime",
"data": {
"route_name": "Т01",
"destinations": ["Залізничний вокзал", "Погулянка"],
"vehicles": [
{
"id": "5907",
"direction": 0,
"destination": "Залізничний вокзал",
"next_stop": { "id": "118", "name": "Залізничний вокзал", "arrival": "2026-09-23T09:35:00.000Z" },
"lat": 49.83947,
"lng": 23.99566,
"bearing": 126,
"lowfloor": true
}
],
"updated_at": "2026-09-23T09:32:10Z"
},
"ui_blocks": [
{ "type": "map", "data": { "center": [49.83947, 23.99566], "zoom": 13, "layers": { "vehicles": "data.vehicles" } } }
]
}route_name is the canonical short name whatever form was passed. direction indexes get_route_static's stops (0 = outbound, 1 = return) and destinations. next_stop is null when the feed has no trip update for the vehicle.
{
"view": "transit_realtime",
"data": {
"center_lat": 49.8419,
"center_lng": 24.0316,
"radius_meters": 500,
"total": 18,
"vehicles": [
{
"id": "3422",
"route": "Т01",
"vehicle_type": "tram",
"direction": 0,
"destination": "Залізничний вокзал",
"lat": 49.84154,
"lng": 24.03364,
"bearing": 258,
"lowfloor": false,
"distance_meters": 152
}
],
"updated_at": "2026-09-23T09:32:10Z"
},
"ui_blocks": [
{ "type": "map", "data": { "center": [49.8419, 24.0316], "zoom": 15, "layers": { "vehicles": "data.vehicles" } } }
]
}{
"view": "transit_realtime",
"data": {
"vehicle_id": "5907",
"route": "Т01",
"license_plate": "1238",
"lat": 49.83947,
"lng": 23.99566,
"bearing": 126,
"direction": 0,
"destination": "Залізничний вокзал",
"upcoming_stops": [
{ "id": "118", "name": "Залізничний вокзал", "arrival": null, "departure": "2026-09-23T09:35:00.000Z" },
{ "id": "188", "name": "Приміський вокзал", "arrival": "2026-09-23T09:35:49.000Z", "departure": null }
],
"updated_at": "2026-09-23T09:32:10Z"
},
"ui_blocks": [
{ "type": "map", "data": { "center": [49.83947, 23.99566], "zoom": 15, "layers": { "vehicles": "data" } } }
]
}route is the route short name, falling back to the opaque GTFS route ID only when the route is missing from the local data. Either value is accepted as route_name by get_route_static and get_route_realtime. license_plate is null when the feed has none.
Prompts
Reusable instruction templates for rendering workflows. Each takes one argument, stop_id (positive integer or digits-only string).
Prompt | Use case |
| Map-first rendering of live vehicles for a stop. |
| Arrival list for a stop, sorted by ETA and grouped by route. |
| Map block first, arrival-list block second, with ETA values kept consistent across both. |
Resources and resource templates
In addition to tools, the server exposes MCP resources for reference data that doesn't require a tool call:
URI | Description |
| Scope, usage, and data caveats for this server (Markdown) |
| Tools reference table (Markdown) |
| Prompt templates catalog (Markdown) |
| Static info for a stop by numeric code — name, coordinates, serving routes (JSON) |
| Static metadata for a route by short name — color, type, stop counts (JSON) |
Security model
Public read-only (no authentication).
No mutating tools are exposed.
POST /mcpis rate-limited to 60 requests/min per IP (in-memory, resets on restart). Excess requests receive HTTP 429 with a JSON-RPC error body.robots.txtis only a best-effort discovery hint and not a protocol contract.
REST API
All endpoints return JSON. :code is a numeric stop code; :name is a route short name (e.g. T1, 32A) or numeric external ID.
Stops
GET /stops.json
All stops as a JSON array, sorted by code.
Response: array of
{ code, name, eng_name, location: [lat, lng], routes, sign, sign_pdf }.
(GET /stops returns an HTML table instead.)
Per-stop route overrides
The upstream route list for a stop is sometimes behind reality. GET /stops
applies a stored override to its Маршрути column — removed routes shown red and
struck through, added ones green — and hangs the matching ?add=/?remove= on
that row's SVG and PDF links, which offline.lad.lviv.ua and pdf.lad.lviv.ua
both understand.
The route column is always clickable: click a route to drop or restore it, type
one into the + box to add it.
Overrides live in the browser's own localStorage (see
public/stopOverrides.js), not on a server — no
account to edit through, no cache to purge, an edit applies at once. The trade
is scope: an override is visible only in the browser that made it, not to
anyone else who opens /stops.
/stops.json reports sign and sign_pdf without overrides applied.
GET /stops/:code
Single stop with live realtime timetable. Short-cached (5–10 s).
Optional:
skipTimetableData=1— omit live arrivals (long-cached response).Response:
{ code, name, eng_name, latitude, longitude, transfers, timetable }.
GET /stops/:code/timetable
Live timetable only for a stop. Short-cached (5–10 s).
Response: array of timetable items.
GET /stops/:code/static
Static stop info without live data. Long-cached (30 days).
Response:
{ code, name, eng_name, latitude, longitude, transfers }.
GET /closest?latitude={lat}&longitude={lng}
Nearby stops — same search as get_stops_around_location, for non-MCP clients.
Optional:
radius— meters, clamped between 50 and 3000 (default 1000).Response: JSON array of
{ code, name, latitude, longitude, distance_meters }(sorted by distance).
Routes
GET /routes.json
All routes as a JSON array, sorted by short name.
Response: raw route objects from the timetable store.
(GET /routes returns an HTML table.)
GET /routes/static/:name
Route shape, stop list, and metadata. Long-cached (30 days).
Response:
{ id, color, type, route_short_name, route_long_name, stops: [[dir0…], [dir1…]], shapes }.Each stop object:
{ code, name, loc, transfers, departures, schedule }.departures— today's departure times (HH:MM), populated only for direction 0 first stop. Kept for backward compatibility.schedule—{ workday: string[], weekend: string[] }departure times by day type, populated only for direction 0 first stop.
GET /routes/dynamic/:name
Live vehicle positions for a route. Short-cached (10 s).
Response: array of
{ id, direction, location: [lat, lng], bearing, speed, lowfloor }.speedis m/s from the GPS unit, ornullwhen not reported.
Vehicles
GET /vehicle/:vehicleId
Live position and upcoming stop arrivals for one vehicle. Short-cached (5 s).
Response:
{ location: [lat, lng], routeId, bearing, speed, direction, licensePlate, arrivals }.speedis m/s from the GPS unit, ornullwhen not reported.
GET /vehicle-by-plate/:plate
Look up a vehicle ID by its license plate. Short-cached (5 s).
The plate is matched case-insensitively with spaces and dashes ignored (
BC-1234-AA,bc 1234 aa, andbc1234aaare all equivalent).Response:
{ vehicleId }— use the returned ID withGET /vehicle/:vehicleId.
GET /transport?latitude={lat}&longitude={lng}
Vehicles within 1 km of a point. Short-cached (10 s).
Response: array of
{ id, route, routeId, direction, vehicle_type, color, location: [lat, lng], bearing, speed, lowfloor }.routeIdis usable as:namein/routes/static/:name;directionmatches the index intostops/shapes(0 = outbound, 1 = return, null if unknown).speedis m/s ornull.
Available Tools
5 toolsget_route_realtimeGet Route RealtimeARead-onlyIdempotentInspect
Returns live positions for all vehicles currently running on a route, optimised for map rendering. Use when the user asks "where is my tram/bus right now?" or wants to see all active vehicles on a specific route on a map. Prefer get_stop_realtime when the user is at a stop and wants to know arrival times rather than vehicle positions. Prefer get_route_static when only the route shape or stop list is needed without live data. Requires a route short name (e.g. "T30", "32A") or numeric external ID.
| Name | Required | Description | Default |
|---|---|---|---|
| route_name | Yes | Route short name (e.g. "T30", "32A") or numeric external ID. |
Output Schema
| Name | Required | Description |
|---|---|---|
| data | Yes | |
| view | Yes | |
| ui_blocks | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate readOnlyHint=true, idempotentHint=true, openWorldHint=false. Description adds real-time and map rendering context, consistent with annotations. No contradictions, but could mention possible data latency or frequency of updates.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences plus a note, all valuable. Front-loaded with the main action, then usage guidelines and input format. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that an output schema exists, the description does not need to explain return values. It covers what the tool does, when to use it, and input requirements. Fully sufficient for an agent to decide to invoke.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Only one parameter 'route_name' with 100% schema coverage. Description adds examples ('T30', '32A') and clarifies it accepts short name or numeric external ID, providing more meaning than the schema alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it returns live positions for all vehicles on a route, optimized for map rendering. It distinguishes from siblings by specifying use cases like 'where is my tram/bus right now?' versus arrival times at a stop.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says when to use this tool vs alternatives: prefer get_stop_realtime for arrival times, get_route_static for route shape/stop list without live data. Also specifies input format requirement (route short name or numeric external ID).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_route_staticGet Route StaticARead-onlyIdempotentInspect
Returns static route metadata: short and long name, vehicle type, brand colour, ordered stop lists for both directions, and route polylines (shapes) for map rendering. Use when the user asks which stops a route serves, what a route looks like on a map, or what the scheduled departure times are. Do NOT use this when live vehicle positions are needed — use get_route_realtime instead. Requires a route short name (e.g. "T30", "32A") or numeric external ID; call get_stops_around_location first if you only know a location and need to discover which routes serve it.
| Name | Required | Description | Default |
|---|---|---|---|
| route_name | Yes | Route short name (e.g. "T30", "32A") or numeric external ID. |
Output Schema
| Name | Required | Description |
|---|---|---|
| data | Yes | |
| view | Yes | |
| ui_blocks | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations (readOnlyHint, idempotentHint) already indicate safety. Description adds context that data is static and what it includes, but doesn't disclose any hidden behaviors. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Every sentence is purposeful. Front-loaded with purpose, then usage guidelines, then parameter notes. No redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a static data retrieval tool with an output schema (not shown) and sibling tools listed, the description covers all necessary context: what, when, when not, and how to get inputs. Complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and the parameter description is clear. Description adds value by explaining how to obtain the route name if needed (via get_stops_around_location), which aids tool selection.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Returns' and lists concrete resources: static route metadata, stop lists, polylines. It distinguishes from siblings by explicitly mentioning when not to use (live positions -> get_route_realtime).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit use cases (user asks for stops, map, scheduled times) and non-use cases (live positions) with alternative named. Also gives prerequisite for obtaining route name if unknown.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_stop_geometryGet Stop GeometryARead-onlyIdempotentInspect
Returns static map context for a stop: its marker and polylines for every route that serves it. No live data is fetched. Use this when you need to enrich an existing map with route shapes (e.g. overlay polylines alongside a get_stop_realtime map block) or when the user asks to visualise which routes pass a stop without needing live arrivals. Do NOT use this when live arrival times or vehicle positions are needed — use get_stop_realtime instead. Requires a numeric stop ID; call get_stops_around_location first if you only have coordinates.
| Name | Required | Description | Default |
|---|---|---|---|
| stop_id | Yes | Municipal stop code shown on stop signage (e.g. 707). Accepts a positive integer or an equivalent digit-only string. |
Output Schema
| Name | Required | Description |
|---|---|---|
| data | Yes | |
| view | Yes | |
| ui_blocks | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, openWorldHint. The description adds that no live data is fetched and specifies return components (marker, polylines), which is valuable beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two well-structured sentences, front-loaded, no wasted words. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has an output schema, the description adequately covers purpose, usage guidelines, and prerequisites. Parameter is simple. No gaps identified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with clear parameter description. The description reiterates it requires a numeric stop ID and adds cross-reference to get_stops_around_location, but adds minimal new semantic info beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool returns static map context for a stop: marker and polylines for every route. It uses specific verbs and resource, distinguishing from sibling get_stop_realtime.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says when to use (enrich map, visualize routes) and when not to (live data needed), with a direct reference to get_stop_realtime as alternative. Also provides prerequisite to call get_stops_around_location if only coordinates are available.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_stop_realtimeGet Stop RealtimeARead-onlyIdempotentInspect
Returns live arrivals and vehicle positions for a stop, producing both a map UI block and a structured arrival list. Use this as the default tool when the user asks about arrivals, departures, or vehicles at a specific stop. Prefer get_stop_geometry when only static route polylines are needed and live data is irrelevant. Requires a numeric stop ID (shown on stop signage); use get_stops_around_location first if you only have an address or coordinates.
| Name | Required | Description | Default |
|---|---|---|---|
| stop_id | Yes | Municipal stop code shown on stop signage (e.g. 707). Accepts a positive integer or an equivalent digit-only string. |
Output Schema
| Name | Required | Description |
|---|---|---|
| data | Yes | |
| view | Yes | |
| ui_blocks | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate read-only and idempotent. The description adds that it produces a map UI block and structured list, which is behavioral context beyond annotations. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with essential information, front-loaded with purpose, and no extraneous words. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with one parameter, full schema coverage, and output schema, the description covers all necessary aspects: functionality, usage context, parameter source, and sibling relationships.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline 3. The description adds value by explaining how to obtain the stop ID (from signage) and when to use a different tool for other inputs, exceeding mere schema details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool returns live arrivals and vehicle positions for a stop, specifying both a map UI block and structured arrival list. It distinguishes itself from siblings like `get_stop_geometry` and `get_stops_around_location`.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says to use as default for arrivals/departures, prefers `get_stop_geometry` for static data, and suggests `get_stops_around_location` for address/coordinate inputs. Provides clear when-to-use and alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_stops_around_locationGet Stops Around LocationARead-onlyIdempotentInspect
Discovers transit stops near a geographic point, returning each stop's numeric code, name, coordinates, and walking distance. Also emits a map UI block with multiple markers for map-capable clients (e.g. ChatGPT). Use this as the first step whenever the user provides an address, place name, or coordinates and you need stop IDs before calling get_stop_realtime or get_stop_geometry. Do NOT use this to fetch arrivals or live vehicle data — it returns stop metadata only. Default radius is 1 000 m; narrow it (e.g. 300 m) for dense urban areas or widen it (up to 3 000 m) for rural locations.
| Name | Required | Description | Default |
|---|---|---|---|
| latitude | Yes | Decimal latitude of the search centre, WGS84 (e.g. 49.842 for central Lviv). | |
| longitude | Yes | Decimal longitude of the search centre, WGS84 (e.g. 24.031 for central Lviv). | |
| radius_meters | No | Search radius in metres (50–3000, default 1000). Use ~300 for dense urban intersections, up to 3000 for suburban or rural areas. |
Output Schema
| Name | Required | Description |
|---|---|---|
| data | Yes | |
| view | Yes | |
| ui_blocks | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and idempotentHint=true, so safety profile is clear. Description adds valuable context: emits a map UI block for map-capable clients, default radius is 1000 m, and valid radius range (50–3000). This goes beyond annotations without contradicting them.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is efficiently structured: first sentence states primary function and added map UI block, second sentence provides usage guidance and exclusions, third sentence offers radius optimization tips. No redundant or superfluous information; every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that an output schema exists (so return structure need not be described), the description is complete: it covers purpose, when to use, when not to use, and parameter behavior. Context signals (3 params, 2 required, 100% schema coverage, sibling tools) are fully addressed by the description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema already covers all parameters with descriptions (100% coverage). Description adds no new parameter details but provides usage context: default radius (1000 m), suggested values for dense urban (300 m) vs rural (3000 m), and clarifies that latitude/longitude use WGS84. This added value justifies a score above baseline 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool discovers transit stops near a geographic point, returning specific metadata (code, name, coordinates, distance) and a map UI block. It distinguishes itself from sibling tools like get_stop_realtime (arrivals) and get_stop_geometry (geometry), ensuring unambiguous purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says to use as the first step when needing stop IDs before calling get_stop_realtime or get_stop_geometry, and warns not to use for arrivals or live data. Also provides radius adjustment guidance for dense urban vs rural areas, leaving no ambiguity about when to employ this tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v1.0.11- Added
get_route_realtime - Added
get_route_static - Added
get_stop_geometry - Added
get_stop_realtime - Added
get_stops_around_location
5 tool updates
v1.0.9- Removed
get_route_realtime - Removed
get_route_static - Removed
get_stop_geometry - Removed
get_stop_realtime - Removed
get_stops_around_location
3 tool updates
v1.0.8- Changed
get_stop_geometry2 fields changed- changed
Input schema / properties / stop_id / anyOfPrevious value: -[ - { - "description": "Numeric municipal stop code (e.g. 707).", - "exclusiveMinimum": 0, - "maximum": 9007199254740991, - "type": "integer" - }, - { - "description": "Municipal stop code as digits-only string (e.g. \"707\").", - "pattern": "^\\d+$", - "type": "string" - } -]New value: +[ + { + "description": "Positive integer stop code (e.g. 707).", + "exclusiveMinimum": 0, + "maximum": 9007199254740991, + "type": "integer" + }, + { + "description": "Stop code as a digits-only string (e.g. \"707\").", + "pattern": "^\\d+$", + "type": "string" + } +] - added
Input schema / properties / stop_id / descriptionAdded value: +"Municipal stop code shown on stop signage (e.g. 707). Accepts a positive integer or an equivalent digit-only string."
- Changed
get_stop_realtime2 fields changed- changed
Input schema / properties / stop_id / anyOfPrevious value: -[ - { - "description": "Numeric municipal stop code (e.g. 707).", - "exclusiveMinimum": 0, - "maximum": 9007199254740991, - "type": "integer" - }, - { - "description": "Municipal stop code as digits-only string (e.g. \"707\").", - "pattern": "^\\d+$", - "type": "string" - } -]New value: +[ + { + "description": "Positive integer stop code (e.g. 707).", + "exclusiveMinimum": 0, + "maximum": 9007199254740991, + "type": "integer" + }, + { + "description": "Stop code as a digits-only string (e.g. \"707\").", + "pattern": "^\\d+$", + "type": "string" + } +] - added
Input schema / properties / stop_id / descriptionAdded value: +"Municipal stop code shown on stop signage (e.g. 707). Accepts a positive integer or an equivalent digit-only string."
- Changed
get_stops_around_location3 fields changed- changed
Input schema / properties / latitude / descriptionPrevious value: -"Center latitude (WGS84)."New value: +"Decimal latitude of the search centre, WGS84 (e.g. 49.842 for central Lviv)." - changed
Input schema / properties / longitude / descriptionPrevious value: -"Center longitude (WGS84)."New value: +"Decimal longitude of the search centre, WGS84 (e.g. 24.031 for central Lviv)." - changed
Input schema / properties / radius_meters / descriptionPrevious value: -"Search radius in meters (default 1000; same cap as the public /closest API)."New value: +"Search radius in metres (50–3000, default 1000). Use ~300 for dense urban intersections, up to 3000 for suburban or rural areas."
2 tool updates
v1.0.5- Added
get_route_realtime - Added
get_route_static
1 tool update
v1.0.4- Removed
get_vehicles_by_stop
4 tool updates
v1.0.0- First observed
get_stop_geometry - First observed
get_stop_realtime - First observed
get_stops_around_location - First observed
get_vehicles_by_stop
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: route static vs realtime, stop geometry vs realtime, and stop discovery. Descriptions explicitly disambiguate when to use each, leaving no ambiguity.
All tool names follow the consistent pattern 'get_[resource]_[modifier]' in snake_case, e.g., get_route_realtime, get_stop_geometry. The naming is predictable and easy to understand.
5 tools is well-scoped for a transit information server, covering all essential operations: route static and realtime data, stop static geometry and realtime arrivals, and stop discovery. No excess or deficiency.
The tool surface is complete for the domain: users can discover stops, get realtime arrivals, static route info, route shapes, and live vehicle positions. There are no obvious gaps such as missing CRUD operations or dead ends.
Maintenance
Related MCP Connectors
Read-only public transit departures, stop search, and city coverage for bus and train users.
MBTA MCP — Boston real-time transit via the MBTA v3 API (api-v3.mbta.com)
Transitland MCP — global GTFS aggregator
SEPTA MCP — Philadelphia SEPTA real-time transit (www3.septa.org/api, keyless)
Related MCP Servers
- FlicenseAqualityBmaintenanceA Model Context Protocol server that provides real-time Caltrain schedule information, allowing AI assistants to look up train departures between any stations and access station information using GTFS data.210-
- FlicenseNot gradedqualityDmaintenanceA server that provides seamless access to the GTFOBins database through Claude Desktop, allowing users to query exploitation techniques, search for specific binaries, and explore privilege escalation methods directly from Claude conversations.-
- AlicenseNot gradedqualityDmaintenanceEnables searching for Auckland public transport stops and retrieving real-time transit schedules and timetables using the Auckland Transport API with GTFS standardized data.MIT
- FlicenseNot gradedqualityDmaintenanceProvides real-time transit data for OC Transpo in Ottawa, including live vehicle positions and trip updates via GTFS-RT feeds. It enables AI agents to monitor arrival delays, schedule changes, and transit telemetry through the Model Context Protocol.2-