Skip to main content
Glama

Plan a journey

plan_journey
Read-onlyIdempotent

Plans bus and metro journeys between two places in one city network. Returns the first journey leaving at or after the departure time as numbered steps with boarding stops, changes, walking, times and fare, a link that opens it in PakBus, and up to two later departures on one line. When the first bus has live positions and the journey leaves within the hour, it also says when the next one reaches the boarding stop. Apps that show interactive views also get a map of the journey.

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": {
      "city": "<city>",
      "from": "<from>",
      "to": "<to>"
    },
    "name": "plan_journey"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesplace_id of the destination, from find_places.
cityYesCity network from find_places or list_cities, such as Lahore, Attock or Rawalpindi.
fromYesplace_id of the start, from find_places.
departNoDeparture date and time in Pakistan local time, as YYYY-MM-DDTHH:MM. Leave out to leave now. Search again with a later time for later journeys.
max_changesNoMost changes between buses, 0 for direct journeys only. Defaults to 2. When none are found within the limit, journeys with up to 5 changes are returned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior5/5

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

Annotations only cover the safety profile (readOnly, idempotent, non-destructive); the description goes well beyond by disclosing the exact return shape, the conditional live-position enrichment for departures within the hour, and the map returned to interactive apps. That is real behavioral context an agent cannot get from the annotations or schema.

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?

Three front-loaded sentences: purpose first, then return contents, then conditional extras. Dense but each clause carries information; the map/interactive-app sentence is the most expendable.

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?

With no output schema, the description must explain return values, and it does so concretely (numbered steps, boarding stops, changes, walking, times, fare, link, later departures). Combined with a fully documented input schema, an agent has enough to call and interpret this tool correctly.

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

Parameters3/5

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

Schema description coverage is 100%, so all five parameters are already documented in the input schema, including max_changes fallback behaviour and the depart time format. The description adds essentially no parameter-level meaning beyond what the schema carries, so the baseline 3 applies.

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?

Specific verb and resource with scope: 'Plans bus and metro journeys between two places in one city network', plus the departure-time semantics. An agent can tell this apart from route_details or place_departures by inference, but no sibling is named explicitly.

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 only implied through the return description ('first journey leaving at or after the departure time'); there is no explicit statement of when to prefer this over route_details or place_departures. The one actionable hint, re-searching with a later time for later journeys, lives in the schema rather than the description.

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.