Skip to main content
Glama

Get trip

get_trip
Read-only

Retrieve a vehicle run's stop-by-stop realtime schedule, including planned and actual times, delays, and platforms, to check whether a train or bus is on time.

Instructions

Stop-by-stop realtime schedule of one vehicle run on one day: origin and destination, plus every stop in between in stopovers, with planned/realtime times, delays and platforms. Covers the whole run, not just the leg the tripId came from (an ICE taken from Berlin may start in Hamburg). Use it to check whether a train or bus is on time. A trip id encodes its date: take it from a board or journey of the wanted day, never edit it. Times are ISO 8601 in each station's local time with its UTC offset; stops carry their IANA tz (none = German time). Delays in seconds (positive = late). Planned values equal to realtime ones and empty fields are omitted. Results: JSON, then "Hints:" (situational advice; attribution, credit once).

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": {
      "tripId": "<tripId>"
    },
    "name": "get_trip"
  }
}

Input Schema

NameRequiredDescriptionDefault
tripIdYes`tripId` from a plan_journey leg or a board entry.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint, and the description adds substantial behavior: delays are in seconds with positive meaning late, planned values equal to realtime and empty fields are omitted, timestamps are ISO 8601 in station-local time with UTC offsets, and stops carry an IANA tz. It also discloses the response shape (JSON followed by a "Hints:" block with attribution credited once), which annotations do not cover.

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 first sentence front-loads the core purpose and the rest is densely packed with constraints and formatting rules, with no filler. It is longer than minimal, but nearly every clause carries operational information, so it stays tight for the amount of behavior disclosed.

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 carries the full burden of describing returns, and it does so: stopovers structure, delay units and sign, omission rules, time format, and the trailing Hints section. For a one-parameter read tool, nothing an agent needs to call and interpret it is missing.

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% for the single `tripId` parameter, so the baseline is 3, but the description adds meaning the schema lacks: the id encodes its date, must be taken from a board or journey of the wanted day, and must never be edited. That materially affects how an agent obtains a valid value rather than guessing one.

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: the stop-by-stop realtime schedule of one vehicle run on one day, with origin, destination, and every intermediate stop in `stopovers`. It sharpens the scope against the sibling board tools by noting it covers the whole run rather than the leg the `tripId` came from, so an agent can distinguish it from get_arrivals/get_departures without opening a schema.

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

Usage Guidelines4/5

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

"Use it to check whether a train or bus is on time" gives a clear use context, and the trip-id provenance rule (take it from a board or journey of the wanted day, never edit it) is an actionable constraint. It stops short of explicitly naming when another sibling such as plan_journey should be preferred instead.

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