Skip to main content
Glama

plan_journey

Plan a public transit journey between two stations or coordinates, returning ranked itineraries with leg details and transfer counts.

Instructions

Plan a public-transit (rail/subway) journey using a self-hosted OpenTripPlanner instance (self-hosted OTP (Kanto rail/subway)). 'from' and 'to' are each a station name (e.g. "新宿") or a "lat,lon" coordinate. Returns ranked itineraries with per-leg lines (line name, stations, minutes), departure/arrival times, and transfer count. Accurate within the covered area (Kanto); returns no route for places outside coverage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesDestination: a station name or a "lat,lon" coordinate.
fromYesOrigin: a station name or a "lat,lon" coordinate.
numItinerariesNoNumber of itineraries to return (default 3).
Behavior4/5

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

With no annotations, the description adequately discloses that this is a read-only query to a self-hosted OTP instance, returns ranked itineraries with detailed per-leg information, and fails gracefully for out-of-coverage locations. It does not mention any side effects or rate limits, but given the read-only nature, the transparency is sufficient.

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?

The description is concise (4 sentences) and front-loaded with the core purpose. While a more structured format (e.g., bullet points) could improve readability, the current paragraph is clear and efficient with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of an output schema, the description covers the return format (ranked itineraries, per-leg details, times, transfer count) and a failure scenario. It does not address error handling for invalid station names, but for a simple tool with 3 parameters, it is largely complete.

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 the schema already explains each parameter. The description reiterates that 'from' and 'to' can be station names or coordinates, and mentions the default for 'numItineraries', which is already in the schema. Thus, the description adds minimal value beyond the schema.

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?

The description clearly states the tool plans a public-transit journey using a specific self-hosted OTP instance for the Kanto area. It distinguishes from siblings by focusing on rail/subway journey planning, while 'plan_route_map' likely handles map-based routes and 'suggest_stations' provides station suggestions.

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?

The description implies usage for journey planning within Kanto but does not explicitly guide when to use this tool versus alternatives like 'plan_route_map' or 'suggest_stations'. It provides a limitation (covers only Kanto) but no direct comparison or exclusion criteria.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ojimpo/otp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server