Skip to main content
Glama

plan_journey

Plan a bus journey between two stops with a target arrival time, including direct or one-change routes and optional live disruption alerts.

Instructions

Plan a journey from stop_a to stop_b arriving by a given time. Supports direct routes and single changes.

Parameters: stop_a: Starting stop (NaPTAN code or name). stop_b: Destination stop (NaPTAN code or name). arrive_by: Target arrival time (HH:MM, 24h format). day: Optional day filter: mon, tue, wed, thu, fri, sat, sun. Defaults to today. max_changes: Maximum number of bus changes (0 = direct only, 1 = one change). Default 1. check_disruptions: If true (default), plans whose route or operator appears in the live SIRI-SX disruptions feed are annotated with a "disruption_alerts" list. Annotation never drops or reorders a plan and never changes the returned count; a feed failure degrades silently. At most the 15 earliest-arriving plans are returned, with or without annotation.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "stop_a": "<stop_a>",
      "stop_b": "<stop_b>",
      "arrive_by": "<arrive_by>"
    },
    "name": "plan_journey"
  }
}

Input Schema

NameRequiredDescriptionDefault
dayNo
stop_aYes
stop_bYes
arrive_byYes
max_changesNo
check_disruptionsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.3
    • addedInput schema / properties / check_disruptions
      Added value: +{
      +  "default": true,
      +  "title": "Check Disruptions",
      +  "type": "boolean"
      +}
  2. First observedv1.0.2

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that at most 15 earliest-arriving plans are returned, that check_disruptions only annotates and never drops, reorders or changes the count, and that a feed failure degrades silently. Gaps remain on error behaviour for invalid or ambiguous stops and what an empty result looks like.

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 a one-line purpose, then a scannable per-parameter list. The check_disruptions entry runs long, but each clause conveys distinct behaviour; overall there is little wasted text.

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?

An output schema exists, so return values need not be restated, and the description covers every input parameter plus the result-set size limit and degradation behaviour. For a six-parameter planning tool with no annotations, an agent has enough to call it correctly.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate and does: it gives NaPTAN-or-name formats for both stops, HH:MM 24h for arrive_by, the allowed day values with a 'today' default, the concrete max_changes meanings (0=direct, 1=one change) with default, and the full semantics of check_disruptions. Every one of the six parameters gains meaning beyond the bare schema titles.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Plan a journey from stop_a to stop_b arriving by a given time', plus scope limits ('supports direct routes and single changes'). This lets an agent distinguish it from timetable/ETA siblings, but it never names or contrasts with find_routes_between_stops, which sounds closely related.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the semantics: choose this when you have an origin, destination and target arrival time, and use max_changes to control transfers. There is no explicit when-not guidance and no routing to alternatives such as find_routes_between_stops or estimate_live_eta, so the agent must infer the boundary itself.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.