Skip to main content
Glama

Lviv Public Transport

Find Routes Between Stops

find_routes_between
Read-onlyIdempotent

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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "find_routes_between"
  }
}

Input Schema

NameRequiredDescriptionDefault
to_latNoDecimal latitude of the destination, WGS84 (e.g. 49.842 for central Lviv).
to_lngNoDecimal longitude of the destination, WGS84 (e.g. 24.031 for central Lviv).
from_latNoDecimal latitude of the start point, WGS84 (e.g. 49.842 for central Lviv).
from_lngNoDecimal longitude of the start point, WGS84 (e.g. 24.031 for central Lviv).
arrive_byNoArrive by this time: "HH:MM" Lviv time today, or ISO 8601. Not together with `depart_at`.
depart_atNoLeave at this time: "HH:MM" Lviv time today, or ISO 8601. Default now. Not together with `arrive_by`.
to_stop_idNoStop ID where the trip ends. Give this or `to_lat` + `to_lng`.
from_stop_idNoStop ID where the trip starts. Give this or `from_lat` + `from_lng`.

Output Schema

NameRequiredDescriptionDefault
dataYes
viewYes
ui_blocksYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, openWorld), and the description layers on substantial behavior: exactly one interchange maximum, transfer listing conditions, exclusion of suspended routes and detour-skipped stops, the walk_meters shortcut, and that two empty lists mean two-plus transfers are required. It stops short of promising response sizes or rate limits, but the domain behavior disclosed is well beyond the annotations.

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 purpose and result shape, then parameters, then usage triggers — a sensible order. It is dense but nearly every clause carries operational meaning; the one inefficiency is the lengthy narration of return fields (options, transfer_options, schedule, map_stops) that an output schema already documents.

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 an eight-parameter, open-world routing tool with optional endpoint combinations, the description covers the endpoint alternatives, time options, output semantics, transfer limits, and degenerate cases. An agent could invoke it correctly without consulting any other tool's definition.

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

Parameters4/5

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

Schema coverage is 100%, so a baseline of 3 applies, but the description adds real meaning: an end is a stop ID or lat/lng point, and a point covers every stop within a 600 m walk, while a stop end covers stops within 300 m. It also clarifies default time planning 'for now' and the depart_at/arrive_by alternatives, adding semantics the schema alone does not convey.

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 and resource (list routes from one place to another) and immediately enumerates the output shape: boarding stop, alighting stop, direction, intermediate stops, end walks, best-first with walking counted. It is clearly distinguishable from siblings like get_route_static or search_stops, which it explicitly routes to for stop IDs.

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?

Gives an explicit trigger list: '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.' It also rules out a redundant sibling call ('so no separate get_stop_realtime call is needed') and points to search_stops / get_stops_around_location for the prerequisite of obtaining stop IDs.

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.