Lviv Public Transport
Lviv public transport MCP: stops, timetables, routes, and live vehicle positions. No API key.
使うべきか
品質と安全性
ツール定義とプロトコルへの準拠に関する自動分析に基づいています。
コンテキストコスト
これは、サーバーのツールがモデルのコンテキストに読み込まれるたびに消費されるおおよそのトークン数です。数が多いほど、ほかのタスクに使える注意が減ります。
インストール
ワンクリックインストール
これを `claude_desktop_config.json` ファイルに追加してください:
{
"mcpServers": {
"timetable-api-node": {
"url": "https://api.lad.lviv.ua/mcp"
}
}
}リモートエンドポイント
https://api.lad.lviv.ua/mcpstreamable-httpできること
ツール一覧
ツール(9)
🟢get_stop_realtime(stop_id, lowfloor_only)
Returns live arrivals at a stop: route, destination, vehicle type, minutes until arrival, and each vehicle's position. Use this as the **default tool** when the user asks about arrivals, departures, or the next bus/tram at a specific stop. Requires a numeric stop ID (shown on stop signage); use `search_stops` when you have a stop name, or `get_stops_around_location` when you have coordinates.
入力スキーマ
{
"type": "object",
"properties": {
"stop_id": {
"type": "integer",
"exclusiveMinimum": 0,
"description": "Municipal stop code shown on stop signage (e.g. 707). Accepts a positive integer or an equivalent digit-only string."
},
"lowfloor_only": {
"description": "Only low-floor arrivals (step-free: wheelchairs, prams). Timetable entries without a tracked vehicle are left out, since their floor is unknown. Default false.",
"type": "boolean"
}
},
"required": [
"stop_id"
]
}出力スキーマ
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "transit_realtime"
},
"data": {
"type": "object",
"properties": {
"stop": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"lat": {
"type": [
"number",
"null"
]
},
"lng": {
"type": [
"number",
"null"
]
}
},
"required": [
"id",
"name",
"lat",
"lng"
]
},
"arrivals": {
"type": "array",
"items": {
"type": "object",
"properties": {
"route": {
"type": [
"string",
"null"
]
},
"direction": {
"type": [
"string",
"null"
]
},
"vehicle_type": {
"type": [
"string",
"null"
]
},
"arrival_minutes": {
"type": [
"integer",
"null"
]
},
"vehicle_id": {
"type": [
"string",
"null"
]
},
"lat": {
"type": [
"number",
"null"
]
},
"lng": {
"type": [
"number",
"null"
]
},
"bearing": {
"type": [
"number",
"null"
]
},
"lowfloor": {
"type": [
"boolean",
"null"
]
},
"scheduled": {
"type": "boolean"
}
},
"required": [
"route",
"direction",
"vehicle_type",
"arrival_minutes",
"vehicle_id",
"lat",
"lng",
"bearing",
"lowfloor",
"scheduled"
]
}
},
"lowfloor_only": {
"type": "boolean"
},
"disruptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"enum": [
"suspended",
"detour",
"stop_moved",
"stop_closed"
]
},
"reason": {
"type": "string"
},
"since": {
"type": "string"
},
"until": {
"type": [
"string",
"null"
]
},
"until_text": {
"type": [
"string",
"null"
]
},
"routes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"name",
"id"
]
}
},
"stops": {
"type": "array",
"items": {
"type": "integer"
}
},
"alternatives": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"name",
"id"
]
}
},
"detour": {
"type": [
"object",
"null"
],
"properties": {
"via": {
"type": "array",
"items": {
"type": "string"
}
},
"skipped_stops": {
"type": "array",
"items": {
"type": "integer"
}
}
},
"required": [
"via",
"skipped_stops"
]
},
"area": {
"type": [
"object",
"null"
],
"properties": {
"lat": {
"type": "number"
},
"lng": {
"type": "number"
},
"radius_meters": {
"type": "number"
}
},
"required": [
"lat",
"lng",
"radius_meters"
]
},
"note": {
"type": [
"string",
"null"
]
},
"source": {
"type": [
"string",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"kind",
"reason",
"since",
"until",
"until_text",
"routes",
"stops",
"alternatives",
"detour",
"area",
"note",
"source",
"url"
]
}
},
"updated_at": {
"type": "string"
}
},
"required": [
"stop",
"arrivals",
"lowfloor_only",
"updated_at"
]
},
"ui_blocks": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "map"
},
"data": {
"type": "object",
"properties": {
"center": {
"type": "array",
"prefixItems": [
{
"type": [
"number",
"null"
]
},
{
"type": [
"number",
"null"
]
}
],
"items": false,
"minItems": 2,
"maxItems": 2
},
"zoom": {
"type": "number"
},
"layers": {
"type": "object",
"properties": {
"stops": {
"type": "string"
},
"vehicles": {
"type": "string"
},
"polylines": {
"type": "string"
}
}
}
},
"required": [
"center",
"zoom",
"layers"
]
}
},
"required": [
"type",
"data"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "arrival_list"
},
"data": {
"type": "object",
"properties": {
"source": {
"type": "string"
}
},
"required": [
"source"
]
}
},
"required": [
"type",
"data"
]
}
]
}
}
},
"required": [
"view",
"data",
"ui_blocks"
]
}🟢search_stops(query, limit)
Finds stops by name (Ukrainian or English transliteration, case-insensitive, partial match) and returns each stop's numeric ID, coordinates, and the routes serving it. Use this as the **first step** when the user names a stop or landmark stop (e.g. "Опера", "Rynok", "Головний вокзал") and you need a stop ID for `get_stop_realtime` or `find_routes_between`. One name usually covers both sides of the street under different IDs; each is returned, and the `routes` list tells them apart. Use `get_stops_around_location` instead when you have coordinates rather than a name.
入力スキーマ
{
"type": "object",
"properties": {
"query": {
"type": "string",
"minLength": 2,
"description": "Stop name or part of it, e.g. \"Ринок\", \"opera\", \"Стрийська\"."
},
"limit": {
"description": "Maximum stops to return (1–25, default 10).",
"type": "integer",
"minimum": 1,
"maximum": 25
}
},
"required": [
"query"
]
}出力スキーマ
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "transit_realtime"
},
"data": {
"type": "object",
"properties": {
"query": {
"type": "string"
},
"stops": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"lat": {
"type": [
"number",
"null"
]
},
"lng": {
"type": [
"number",
"null"
]
},
"routes": {
"type": "array",
"items": {
"type": "string"
}
},
"eng_name": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"name",
"lat",
"lng",
"routes",
"eng_name"
]
}
},
"updated_at": {
"type": "string"
}
},
"required": [
"query",
"stops",
"updated_at"
]
},
"ui_blocks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "map"
},
"data": {
"type": "object",
"properties": {
"center": {
"type": "array",
"prefixItems": [
{
"type": [
"number",
"null"
]
},
{
"type": [
"number",
"null"
]
}
],
"items": false,
"minItems": 2,
"maxItems": 2
},
"zoom": {
"type": "number"
},
"layers": {
"type": "object",
"properties": {
"stops": {
"type": "string"
},
"vehicles": {
"type": "string"
},
"polylines": {
"type": "string"
}
}
}
},
"required": [
"center",
"zoom",
"layers"
]
}
},
"required": [
"type",
"data"
]
}
}
},
"required": [
"view",
"data",
"ui_blocks"
]
}🟢find_routes_between(from_stop_id, from_lat, from_lng, to_stop_id, to_lat, ...)
Lists the routes from one place to another: which stop to board, where to get off, the direction's destination, stops in between, and the walk at each end — best first, walking counted. Each end is a stop ID (`from_stop_id`) or coordinates (`from_lat` + `from_lng`), e.g. an address the user gave; a point covers every stop within a 600 m walk of it. `options` are direct routes. `transfer_options` have exactly one interchange (never more): ride `legs[0]`, walk `transfer_walk_meters` (within a 300 m stop cluster, 0 when it is the same stop) to `legs[1].board_stop`, ride `legs[1]`. They are listed when there is no direct route or when they beat the best direct one. Every option carries `schedule`: by the timetable, when to leave, when each leg boards and alights, when you arrive, and `total_minutes` door to door. Plan for now by default, or pass `depart_at` or `arrive_by` ("HH:MM" Lviv time today, or ISO 8601). When planning for now, options also carry `next_departures`: the live next departures of the first leg from its boarding stop, so no separate `get_stop_realtime` call is needed. `map_stops` holds the best trip's stops in riding order, each with a `role` (board, transfer — or transfer_alight + transfer_board when the interchange is a walk — and alight). Use when the user asks how to get from A to B, which bus/tram goes from one place to another, how long it takes, or when to leave to be somewhere on time. A stop end covers every stop within a 300 m walk of it, since a line's two directions often stop on opposite sides of a street under different names; `board_stop` says where to actually wait. Routes the city has suspended, and stops a detour skips, are left out. `walk_meters` is set when the two ends are within a 300 m walk of each other: no ride is searched then, so tell the user to walk. Otherwise both lists empty means the trip needs two or more transfers. Get stop IDs with `search_stops` or `get_stops_around_location`.
入力スキーマ
{
"type": "object",
"properties": {
"from_stop_id": {
"description": "Stop ID where the trip starts. Give this or `from_lat` + `from_lng`.",
"type": "integer",
"exclusiveMinimum": 0
},
"from_lat": {
"type": "number",
"minimum": -90,
"maximum": 90,
"description": "Decimal latitude of the start point, WGS84 (e.g. 49.842 for central Lviv)."
},
"from_lng": {
"type": "number",
"minimum": -180,
"maximum": 180,
"description": "Decimal longitude of the start point, WGS84 (e.g. 24.031 for central Lviv)."
},
"to_stop_id": {
"description": "Stop ID where the trip ends. Give this or `to_lat` + `to_lng`.",
"type": "integer",
"exclusiveMinimum": 0
},
"to_lat": {
"type": "number",
"minimum": -90,
"maximum": 90,
"description": "Decimal latitude of the destination, WGS84 (e.g. 49.842 for central Lviv)."
},
"to_lng": {
"type": "number",
"minimum": -180,
"maximum": 180,
"description": "Decimal longitude of the destination, WGS84 (e.g. 24.031 for central Lviv)."
},
"depart_at": {
"description": "Leave at this time: \"HH:MM\" Lviv time today, or ISO 8601. Default now. Not together with `arrive_by`.",
"type": "string"
},
"arrive_by": {
"description": "Arrive by this time: \"HH:MM\" Lviv time today, or ISO 8601. Not together with `depart_at`.",
"type": "string"
}
}
}出力スキーマ
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "transit_realtime"
},
"data": {
"type": "object",
"properties": {
"from": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"stop_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"point": {
"type": "object",
"properties": {
"lat": {
"type": "number"
},
"lng": {
"type": "number"
}
},
"required": [
"lat",
"lng"
]
}
},
"required": [
"id",
"name",
"stop_ids"
]
},
"to": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"stop_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"point": {
"type": "object",
"properties": {
"lat": {
"type": "number"
},
"lng": {
"type": "number"
}
},
"required": [
"lat",
"lng"
]
}
},
"required": [
"id",
"name",
"stop_ids"
]
},
"timing": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"depart_at",
"arrive_by"
]
},
"at": {
"type": "string"
}
},
"required": [
"mode",
"at"
]
},
"options": {
"type": "array",
"items": {
"type": "object",
"properties": {
"route": {
"type": "string"
},
"vehicle_type": {
"type": "string"
},
"direction": {
"type": "integer"
},
"destination": {
"type": [
"string",
"null"
]
},
"board_stop": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"lat": {
"type": [
"number",
"null"
]
},
"lng": {
"type": [
"number",
"null"
]
}
},
"required": [
"id",
"name",
"lat",
"lng"
]
},
"alight_stop": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"lat": {
"type": [
"number",
"null"
]
},
"lng": {
"type": [
"number",
"null"
]
}
},
"required": [
"id",
"name",
"lat",
"lng"
]
},
"stops_count": {
"type": "integer"
},
"walk_to_board_meters": {
"type": "integer"
},
"walk_from_alight_meters": {
"type": "integer"
},
"schedule": {
"type": [
"object",
"null"
],
"properties": {
"leave_at": {
"type": "string"
},
"arrive_at": {
"type": "string"
},
"total_minutes": {
"type": "integer"
},
"legs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"board_at": {
"type": "string"
},
"alight_at": {
"type": "string"
}
},
"required": [
"board_at",
"alight_at"
]
}
}
},
"required": [
"leave_at",
"arrive_at",
"total_minutes",
"legs"
]
},
"next_departures": {
"type": "array",
"items": {
"type": "object",
"properties": {
"arrival_minutes": {
"type": [
"integer",
"null"
]
},
"scheduled": {
"type": "boolean"
},
"vehicle_id": {
"type": [
"string",
"null"
]
},
"lowfloor": {
"type": [
"boolean",
"null"
]
}
},
"required": [
"arrival_minutes",
"scheduled",
"vehicle_id",
"lowfloor"
]
}
}
},
"required": [
"route",
"vehicle_type",
"direction",
"destination",
"board_stop",
"alight_stop",
"stops_count",
"walk_to_board_meters",
"walk_from_alight_meters",
"schedule"
]
}
},
"transfer_options": {
"type": "array",
"items": {
"type": "object",
"properties": {
"legs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"route": {
"type": "string"
},
"vehicle_type": {
"type": "string"
},
"direction": {
"type": "integer"
},
"destination": {
"type": [
"string",
"null"
]
},
"board_stop": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"lat": {
"type": [
"number",
"null"
]
},
"lng": {
"type": [
"number",
"null"
]
}
},
"required": [
"id",
"name",
"lat",
"lng"
]
},
"alight_stop": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"lat": {
"type": [
"number",
"null"
]
},
"lng": {
"type": [
"number",
"null"
]
}
},
"required": [
"id",
"name",
"lat",
"lng"
]
},
"stops_count": {
"type": "integer"
}
},
"required": [
"route",
"vehicle_type",
"direction",
"destination",
"board_stop",
"alight_stop",
"stops_count"
]
}
},
"transfer_walk_meters": {
"type": "integer"
},
"stops_count": {
"type": "integer"
},
"walk_to_board_meters": {
"type": "integer"
},
"walk_from_alight_meters": {
"type": "integer"
},
"schedule": {
"type": [
"object",
"null"
],
"properties": {
"leave_at": {
"type": "string"
},
"arrive_at": {
"type": "string"
},
"total_minutes": {
"type": "integer"
},
"legs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"board_at": {
"type": "string"
},
"alight_at": {
"type": "string"
}
},
"required": [
"board_at",
"alight_at"
]
}
}
},
"required": [
"leave_at",
"arrive_at",
"total_minutes",
"legs"
]
},
"next_departures": {
"type": "array",
"items": {
"type": "object",
"properties": {
"arrival_minutes": {
"type": [
"integer",
"null"
]
},
"scheduled": {
"type": "boolean"
},
"vehicle_id": {
"type": [
"string",
"null"
]
},
"lowfloor": {
"type": [
"boolean",
"null"
]
}
},
"required": [
"arrival_minutes",
"scheduled",
"vehicle_id",
"lowfloor"
]
}
}
},
"required": [
"legs",
"transfer_walk_meters",
"stops_count",
"walk_to_board_meters",
"walk_from_alight_meters",
"schedule"
]
}
},
"map_stops": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"lat": {
"type": [
"number",
"null"
]
},
"lng": {
"type": [
"number",
"null"
]
},
"role": {
"type": "string",
"enum": [
"board",
"transfer",
"transfer_alight",
"transfer_board",
"alight"
]
}
},
"required": [
"id",
"name",
"lat",
"lng",
"role"
]
}
},
"walk_meters": {
"type": "integer"
},
"disruptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"enum": [
"suspended",
"detour",
"stop_moved",
"stop_closed"
]
},
"reason": {
"type": "string"
},
"since": {
"type": "string"
},
"until": {
"type": [
"string",
"null"
]
},
"until_text": {
"type": [
"string",
"null"
]
},
"routes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"name",
"id"
]
}
},
"stops": {
"type": "array",
"items": {
"type": "integer"
}
},
"alternatives": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"name",
"id"
]
}
},
"detour": {
"type": [
"object",
"null"
],
"properties": {
"via": {
"type": "array",
"items": {
"type": "string"
}
},
"skipped_stops": {
"type": "array",
"items": {
"type": "integer"
}
}
},
"required": [
"via",
"skipped_stops"
]
},
"area": {
"type": [
"object",
"null"
],
"properties": {
"lat": {
"type": "number"
},
"lng": {
"type": "number"
},
"radius_meters": {
"type": "number"
}
},
"required": [
"lat",
"lng",
"radius_meters"
]
},
"note": {
"type": [
"string",
"null"
]
},
"source": {
"type": [
"string",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"kind",
"reason",
"since",
"until",
"until_text",
"routes",
"stops",
"alternatives",
"detour",
"area",
"note",
"source",
"url"
]
}
},
"updated_at": {
"type": "string"
}
},
"required": [
"from",
"to",
"timing",
"options",
"transfer_options",
"map_stops",
"updated_at"
]
},
"ui_blocks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "map"
},
"data": {
"type": "object",
"properties": {
"center": {
"type": "array",
"prefixItems": [
{
"type": [
"number",
"null"
]
},
{
"type": [
"number",
"null"
]
}
],
"items": false,
"minItems": 2,
"maxItems": 2
},
"zoom": {
"type": "number"
},
"layers": {
"type": "object",
"properties": {
"stops": {
"type": "string"
},
"vehicles": {
"type": "string"
},
"polylines": {
"type": "string"
}
}
}
},
"required": [
"center",
"zoom",
"layers"
]
}
},
"required": [
"type",
"data"
]
}
}
},
"required": [
"view",
"data",
"ui_blocks"
]
}🟢get_route_static(route_name, include_shapes)
Returns static route data: name, long name, vehicle type, colour, the ordered stop list for both directions, and the timetable of departures from the first stop (workday, Saturday and Sunday). Use when the user asks which stops a route serves, where it goes, or its scheduled departure times. Set `include_shapes` only when you will draw the route on a map — the polylines are large and carry nothing a text answer needs. Do NOT use this for live vehicle positions — use `get_route_realtime` instead. Requires a route short name (e.g. "T30", "32A") or numeric external ID.
入力スキーマ
{
"type": "object",
"properties": {
"route_name": {
"type": "string",
"minLength": 1,
"description": "Route short name (e.g. \"T30\", \"32A\") or numeric external ID."
},
"include_shapes": {
"description": "Include route polylines ([lat, lng] points per direction) for map drawing. Default false.",
"type": "boolean"
}
},
"required": [
"route_name"
]
}出力スキーマ
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "transit_realtime"
},
"data": {
"type": "object",
"properties": {
"route": {
"type": "object",
"properties": {
"name": {
"type": [
"string",
"null"
]
},
"long_name": {
"type": [
"string",
"null"
]
},
"color": {
"type": [
"string",
"null"
]
},
"type": {
"type": [
"string",
"null"
]
}
},
"required": [
"name",
"long_name",
"color",
"type"
]
},
"stops": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"lat": {
"type": [
"number",
"null"
]
},
"lng": {
"type": [
"number",
"null"
]
},
"departures": {
"type": "array",
"items": {
"type": "string"
}
},
"schedule": {
"type": "object",
"properties": {
"workday": {
"type": "array",
"items": {
"type": "string"
}
},
"saturday": {
"type": "array",
"items": {
"type": "string"
}
},
"sunday": {
"type": "array",
"items": {
"type": "string"
}
},
"weekend": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"workday",
"saturday",
"sunday",
"weekend"
]
}
},
"required": [
"id",
"name",
"lat",
"lng",
"departures"
]
}
}
},
"shapes": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
}
}
}
},
"disruptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"enum": [
"suspended",
"detour",
"stop_moved",
"stop_closed"
]
},
"reason": {
"type": "string"
},
"since": {
"type": "string"
},
"until": {
"type": [
"string",
"null"
]
},
"until_text": {
"type": [
"string",
"null"
]
},
"routes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"name",
"id"
]
}
},
"stops": {
"type": "array",
"items": {
"type": "integer"
}
},
"alternatives": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"name",
"id"
]
}
},
"detour": {
"type": [
"object",
"null"
],
"properties": {
"via": {
"type": "array",
"items": {
"type": "string"
}
},
"skipped_stops": {
"type": "array",
"items": {
"type": "integer"
}
}
},
"required": [
"via",
"skipped_stops"
]
},
"area": {
"type": [
"object",
"null"
],
"properties": {
"lat": {
"type": "number"
},
"lng": {
"type": "number"
},
"radius_meters": {
"type": "number"
}
},
"required": [
"lat",
"lng",
"radius_meters"
]
},
"note": {
"type": [
"string",
"null"
]
},
"source": {
"type": [
"string",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"kind",
"reason",
"since",
"until",
"until_text",
"routes",
"stops",
"alternatives",
"detour",
"area",
"note",
"source",
"url"
]
}
},
"updated_at": {
"type": "string"
}
},
"required": [
"route",
"stops",
"updated_at"
]
},
"ui_blocks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "map"
},
"data": {
"type": "object",
"properties": {
"center": {
"type": "array",
"prefixItems": [
{
"type": [
"number",
"null"
]
},
{
"type": [
"number",
"null"
]
}
],
"items": false,
"minItems": 2,
"maxItems": 2
},
"zoom": {
"type": "number"
},
"layers": {
"type": "object",
"properties": {
"stops": {
"type": "string"
},
"vehicles": {
"type": "string"
},
"polylines": {
"type": "string"
}
}
}
},
"required": [
"center",
"zoom",
"layers"
]
}
},
"required": [
"type",
"data"
]
}
}
},
"required": [
"view",
"data",
"ui_blocks"
]
}🟢get_route_realtime(route_name, direction)
Returns every vehicle currently running on a route: position, the destination it is heading to, and its next stop with estimated arrival. `headways` sums up each direction: how many vehicles run, the live gaps between consecutive vehicles in minutes (front to back), and how often the timetable says it should run right now. Use when the user asks "where is my tram/bus right now?", how many vehicles are running, how far the next one is, or how often a route runs. Pass `direction` (0 or 1, as in `get_route_static`'s `stops`) to get only one way. Prefer `get_stop_realtime` when the user is at a stop and wants arrival times there. Requires a route short name (e.g. "T30", "32A") or numeric external ID.
入力スキーマ
{
"type": "object",
"properties": {
"route_name": {
"type": "string",
"minLength": 1,
"description": "Route short name (e.g. \"T30\", \"32A\") or numeric external ID."
},
"direction": {
"description": "Only vehicles heading this way: 0 or 1, the index into get_route_static's `stops`. Omit for both.",
"type": "integer",
"minimum": 0,
"maximum": 1
}
},
"required": [
"route_name"
]
}出力スキーマ
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "transit_realtime"
},
"data": {
"type": "object",
"properties": {
"route_name": {
"type": "string"
},
"destinations": {
"type": "array",
"items": {
"type": [
"string",
"null"
]
}
},
"direction": {
"type": [
"integer",
"null"
]
},
"vehicles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"direction": {
"type": [
"integer",
"null"
]
},
"destination": {
"type": [
"string",
"null"
]
},
"next_stop": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"arrival": {
"type": "string"
}
},
"required": [
"id",
"name",
"arrival"
]
},
"lat": {
"type": [
"number",
"null"
]
},
"lng": {
"type": [
"number",
"null"
]
},
"bearing": {
"type": [
"number",
"null"
]
},
"lowfloor": {
"type": [
"boolean",
"null"
]
}
},
"required": [
"id",
"direction",
"destination",
"next_stop",
"lat",
"lng",
"bearing",
"lowfloor"
]
}
},
"headways": {
"type": "array",
"items": {
"type": "object",
"properties": {
"direction": {
"type": "integer"
},
"destination": {
"type": [
"string",
"null"
]
},
"vehicles": {
"type": "integer"
},
"gaps_minutes": {
"type": "array",
"items": {
"type": [
"integer",
"null"
]
}
},
"scheduled_headway_minutes": {
"type": [
"integer",
"null"
]
}
},
"required": [
"direction",
"destination",
"vehicles",
"gaps_minutes",
"scheduled_headway_minutes"
]
}
},
"disruptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"enum": [
"suspended",
"detour",
"stop_moved",
"stop_closed"
]
},
"reason": {
"type": "string"
},
"since": {
"type": "string"
},
"until": {
"type": [
"string",
"null"
]
},
"until_text": {
"type": [
"string",
"null"
]
},
"routes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"name",
"id"
]
}
},
"stops": {
"type": "array",
"items": {
"type": "integer"
}
},
"alternatives": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"name",
"id"
]
}
},
"detour": {
"type": [
"object",
"null"
],
"properties": {
"via": {
"type": "array",
"items": {
"type": "string"
}
},
"skipped_stops": {
"type": "array",
"items": {
"type": "integer"
}
}
},
"required": [
"via",
"skipped_stops"
]
},
"area": {
"type": [
"object",
"null"
],
"properties": {
"lat": {
"type": "number"
},
"lng": {
"type": "number"
},
"radius_meters": {
"type": "number"
}
},
"required": [
"lat",
"lng",
"radius_meters"
]
},
"note": {
"type": [
"string",
"null"
]
},
"source": {
"type": [
"string",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"kind",
"reason",
"since",
"until",
"until_text",
"routes",
"stops",
"alternatives",
"detour",
"area",
"note",
"source",
"url"
]
}
},
"updated_at": {
"type": "string"
}
},
"required": [
"route_name",
"destinations",
"direction",
"vehicles",
"headways",
"updated_at"
]
},
"ui_blocks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "map"
},
"data": {
"type": "object",
"properties": {
"center": {
"type": "array",
"prefixItems": [
{
"type": [
"number",
"null"
]
},
{
"type": [
"number",
"null"
]
}
],
"items": false,
"minItems": 2,
"maxItems": 2
},
"zoom": {
"type": "number"
},
"layers": {
"type": "object",
"properties": {
"stops": {
"type": "string"
},
"vehicles": {
"type": "string"
},
"polylines": {
"type": "string"
}
}
}
},
"required": [
"center",
"zoom",
"layers"
]
}
},
"required": [
"type",
"data"
]
}
}
},
"required": [
"view",
"data",
"ui_blocks"
]
}🟢get_disruptions(route, stop_id)
Lists closures, detours and moved stops the city announced that are in force today: affected routes, the streets a detour uses, routes to take instead of a suspended one, reason, dates and source. The GTFS stop lists and timetables do not reflect any of this. Use when the user asks about road works, closures, detours, or why a route is not running or a vehicle is off its usual path. Pass `route` and/or `stop_id` to get only the entries touching them; omit both for the whole city.
入力スキーマ
{
"type": "object",
"properties": {
"route": {
"description": "Only disruptions on this route, by short name (e.g. \"Т30\", \"А34\"). Omit for all routes.",
"type": "string",
"minLength": 1
},
"stop_id": {
"description": "Only disruptions at this stop. Omit for all stops.",
"type": "integer",
"exclusiveMinimum": 0
}
}
}出力スキーマ
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "transit_realtime"
},
"data": {
"type": "object",
"properties": {
"route": {
"type": [
"string",
"null"
]
},
"stop_id": {
"type": [
"string",
"null"
]
},
"disruptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"enum": [
"suspended",
"detour",
"stop_moved",
"stop_closed"
]
},
"reason": {
"type": "string"
},
"since": {
"type": "string"
},
"until": {
"type": [
"string",
"null"
]
},
"until_text": {
"type": [
"string",
"null"
]
},
"routes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"name",
"id"
]
}
},
"stops": {
"type": "array",
"items": {
"type": "integer"
}
},
"alternatives": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"name",
"id"
]
}
},
"detour": {
"type": [
"object",
"null"
],
"properties": {
"via": {
"type": "array",
"items": {
"type": "string"
}
},
"skipped_stops": {
"type": "array",
"items": {
"type": "integer"
}
}
},
"required": [
"via",
"skipped_stops"
]
},
"area": {
"type": [
"object",
"null"
],
"properties": {
"lat": {
"type": "number"
},
"lng": {
"type": "number"
},
"radius_meters": {
"type": "number"
}
},
"required": [
"lat",
"lng",
"radius_meters"
]
},
"note": {
"type": [
"string",
"null"
]
},
"source": {
"type": [
"string",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"kind",
"reason",
"since",
"until",
"until_text",
"routes",
"stops",
"alternatives",
"detour",
"area",
"note",
"source",
"url"
]
}
},
"updated_at": {
"type": "string"
}
},
"required": [
"route",
"stop_id",
"disruptions",
"updated_at"
]
},
"ui_blocks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "map"
},
"data": {
"type": "object",
"properties": {
"center": {
"type": "array",
"prefixItems": [
{
"type": [
"number",
"null"
]
},
{
"type": [
"number",
"null"
]
}
],
"items": false,
"minItems": 2,
"maxItems": 2
},
"zoom": {
"type": "number"
},
"layers": {
"type": "object",
"properties": {
"stops": {
"type": "string"
},
"vehicles": {
"type": "string"
},
"polylines": {
"type": "string"
}
}
}
},
"required": [
"center",
"zoom",
"layers"
]
}
},
"required": [
"type",
"data"
]
}
}
},
"required": [
"view",
"data",
"ui_blocks"
]
}🟢get_stops_around_location(latitude, longitude, radius_meters)
Finds stops near a geographic point, returning each stop's numeric ID, name, coordinates, walking distance, and the routes serving it. Use this as the **first step** when the user gives an address or coordinates and you need stop IDs for `get_stop_realtime` or `find_routes_between`. Use `search_stops` instead when the user gives a stop name. 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.
入力スキーマ
{
"type": "object",
"properties": {
"latitude": {
"type": "number",
"minimum": -90,
"maximum": 90,
"description": "Decimal latitude of the search centre, WGS84 (e.g. 49.842 for central Lviv)."
},
"longitude": {
"type": "number",
"minimum": -180,
"maximum": 180,
"description": "Decimal longitude of the search centre, WGS84 (e.g. 24.031 for central Lviv)."
},
"radius_meters": {
"description": "Search radius in metres (50–3000, default 1000). Use ~300 for dense urban intersections, up to 3000 for suburban or rural areas.",
"type": "integer",
"minimum": 50,
"maximum": 3000
}
},
"required": [
"latitude",
"longitude"
]
}出力スキーマ
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "transit_realtime"
},
"data": {
"type": "object",
"properties": {
"center_lat": {
"type": [
"number",
"null"
]
},
"center_lng": {
"type": [
"number",
"null"
]
},
"radius_meters": {
"type": "number"
},
"stops": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"lat": {
"type": [
"number",
"null"
]
},
"lng": {
"type": [
"number",
"null"
]
},
"routes": {
"type": "array",
"items": {
"type": "string"
}
},
"distance_meters": {
"type": [
"number",
"null"
]
}
},
"required": [
"id",
"name",
"lat",
"lng",
"routes",
"distance_meters"
]
}
},
"updated_at": {
"type": "string"
}
},
"required": [
"center_lat",
"center_lng",
"radius_meters",
"stops",
"updated_at"
]
},
"ui_blocks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "map"
},
"data": {
"type": "object",
"properties": {
"center": {
"type": "array",
"prefixItems": [
{
"type": [
"number",
"null"
]
},
{
"type": [
"number",
"null"
]
}
],
"items": false,
"minItems": 2,
"maxItems": 2
},
"zoom": {
"type": "number"
},
"layers": {
"type": "object",
"properties": {
"stops": {
"type": "string"
},
"vehicles": {
"type": "string"
},
"polylines": {
"type": "string"
}
}
}
},
"required": [
"center",
"zoom",
"layers"
]
}
},
"required": [
"type",
"data"
]
}
}
},
"required": [
"view",
"data",
"ui_blocks"
]
}🟢get_nearby_vehicles(latitude, longitude, radius_meters, route, limit, ...)
Returns live vehicles near a point, nearest first, each with its route, destination, and distance. Use when the user asks "what transport is near me right now?" or wants a live map around a location. Narrow with `route` when the user cares about one line; prefer `get_route_realtime` for a whole route and `get_stop_realtime` for arrival times at a stop. Requires decimal latitude and longitude (WGS84).
入力スキーマ
{
"type": "object",
"properties": {
"latitude": {
"type": "number",
"minimum": -90,
"maximum": 90,
"description": "Decimal latitude of the centre point, WGS84 (e.g. 49.842 for central Lviv)."
},
"longitude": {
"type": "number",
"minimum": -180,
"maximum": 180,
"description": "Decimal longitude of the centre point, WGS84 (e.g. 24.031 for central Lviv)."
},
"radius_meters": {
"description": "Search radius in metres (100–1000, default 500).",
"type": "integer",
"minimum": 100,
"maximum": 1000
},
"route": {
"description": "Only vehicles on this route, by short name (e.g. \"Т30\", \"А1\"). Omit for all routes.",
"type": "string",
"minLength": 1
},
"limit": {
"description": "Maximum vehicles to return, nearest first (1–50, default 15). `total` reports how many were in range.",
"type": "integer",
"minimum": 1,
"maximum": 50
},
"lowfloor_only": {
"description": "Only low-floor vehicles (step-free: wheelchairs, prams). Timetable entries without a tracked vehicle are left out, since their floor is unknown. Default false.",
"type": "boolean"
}
},
"required": [
"latitude",
"longitude"
]
}出力スキーマ
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "transit_realtime"
},
"data": {
"type": "object",
"properties": {
"center_lat": {
"type": [
"number",
"null"
]
},
"center_lng": {
"type": [
"number",
"null"
]
},
"radius_meters": {
"type": "number"
},
"lowfloor_only": {
"type": "boolean"
},
"total": {
"type": "integer"
},
"vehicles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": [
"string",
"null"
]
},
"route": {
"type": [
"string",
"null"
]
},
"vehicle_type": {
"type": [
"string",
"null"
]
},
"direction": {
"type": [
"integer",
"null"
]
},
"destination": {
"type": [
"string",
"null"
]
},
"lat": {
"type": [
"number",
"null"
]
},
"lng": {
"type": [
"number",
"null"
]
},
"bearing": {
"type": [
"number",
"null"
]
},
"lowfloor": {
"type": [
"boolean",
"null"
]
},
"distance_meters": {
"type": [
"number",
"null"
]
}
},
"required": [
"id",
"route",
"vehicle_type",
"direction",
"destination",
"lat",
"lng",
"bearing",
"lowfloor",
"distance_meters"
]
}
},
"updated_at": {
"type": "string"
}
},
"required": [
"center_lat",
"center_lng",
"radius_meters",
"lowfloor_only",
"total",
"vehicles",
"updated_at"
]
},
"ui_blocks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "map"
},
"data": {
"type": "object",
"properties": {
"center": {
"type": "array",
"prefixItems": [
{
"type": [
"number",
"null"
]
},
{
"type": [
"number",
"null"
]
}
],
"items": false,
"minItems": 2,
"maxItems": 2
},
"zoom": {
"type": "number"
},
"layers": {
"type": "object",
"properties": {
"stops": {
"type": "string"
},
"vehicles": {
"type": "string"
},
"polylines": {
"type": "string"
}
}
}
},
"required": [
"center",
"zoom",
"layers"
]
}
},
"required": [
"type",
"data"
]
}
}
},
"required": [
"view",
"data",
"ui_blocks"
]
}🟢get_vehicle_info(vehicle_id)
Returns details for one vehicle by ID: position, route, destination, license plate, and its upcoming stops with names and estimated arrival times. Use when the user wants to follow a particular vehicle, e.g. "where does this tram go next?" or "when will it reach X?". Vehicle IDs come from `get_route_realtime`, `get_nearby_vehicles`, or `get_stop_realtime` results. Do NOT use this to get all vehicles on a route — use `get_route_realtime` instead.
入力スキーマ
{
"type": "object",
"properties": {
"vehicle_id": {
"type": "string",
"minLength": 1,
"description": "Vehicle ID as returned by get_route_realtime, get_nearby_vehicles, or get_stop_realtime."
}
},
"required": [
"vehicle_id"
]
}出力スキーマ
{
"type": "object",
"properties": {
"view": {
"type": "string",
"const": "transit_realtime"
},
"data": {
"type": "object",
"properties": {
"vehicle_id": {
"type": "string"
},
"route": {
"type": [
"string",
"null"
]
},
"license_plate": {
"type": [
"string",
"null"
]
},
"lat": {
"type": [
"number",
"null"
]
},
"lng": {
"type": [
"number",
"null"
]
},
"bearing": {
"type": [
"number",
"null"
]
},
"direction": {
"type": [
"integer",
"null"
]
},
"destination": {
"type": [
"string",
"null"
]
},
"upcoming_stops": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"arrival": {
"type": [
"string",
"null"
]
},
"departure": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"name",
"arrival",
"departure"
]
}
},
"updated_at": {
"type": "string"
}
},
"required": [
"vehicle_id",
"route",
"license_plate",
"lat",
"lng",
"bearing",
"direction",
"destination",
"upcoming_stops",
"updated_at"
]
},
"ui_blocks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "map"
},
"data": {
"type": "object",
"properties": {
"center": {
"type": "array",
"prefixItems": [
{
"type": [
"number",
"null"
]
},
{
"type": [
"number",
"null"
]
}
],
"items": false,
"minItems": 2,
"maxItems": 2
},
"zoom": {
"type": "number"
},
"layers": {
"type": "object",
"properties": {
"stops": {
"type": "string"
},
"vehicles": {
"type": "string"
},
"polylines": {
"type": "string"
}
}
}
},
"required": [
"center",
"zoom",
"layers"
]
}
},
"required": [
"type",
"data"
]
}
}
},
"required": [
"view",
"data",
"ui_blocks"
]
}コミュニティ
エビデンス