Skip to main content
Glama

Plan a journey

db_journeys
Read-onlyIdempotent

Plan train connections between any two stations using live Deutsche Bahn data. Get real-time departures/arrivals, delays, platforms, transfers, prices, occupancy, and amenities for each leg.

Instructions

Plan train connections between two stations with live bahn.de data.

Each connection: dep/arr (real-time; '(+7)' = 7 min late, '(+1d)' = next day), duration, changes, price in EUR for the given travellers/BahnCard (None with Deutschlandticket), load (occupancy) per class, recon_token (pass to db_journey_offers for Sparpreis/Flexpreis breakdown), and per leg: line, platforms (real-time, with *_platform_changed), stops count, amenities (WiFi, bike, step-free…), cancellations, journey_id (pass to db_trip_details), and disruption notes. A journey flagged alternative is DB's re-route around a disruption.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
viaNoOptional intermediate station the route must pass through
bikeNoRequire bike carriage
whenNo'YYYY-MM-DD HH:MM' Europe/Berlin local time. Omit for now. No relative words.
adultsNo
formatNo'text' = compact human table (best for chat); 'json' = structuredjson
bahncardNo'25', '50', '100', 'business25', 'business50', or None. Affects prices only.
arrive_byNoIf true, `when` is the LATEST ARRIVAL time instead of earliest departure
seat_onlyNoOnly trains where a seat reservation is possible
to_stationYesDestination: station name, EVA number, or bahn.de id
first_classNoPrice 1st class instead of 2nd
max_resultsNo
from_stationYesOrigin: station name, EVA number, or bahn.de id
children_agesNoAges of accompanying children, e.g. [4, 9]. Affects prices.
max_transfersNo
regional_onlyNoExclude ICE/IC/EC (Deutschlandticket-compatible trains)
min_transfer_minNoMinimum minutes for each change
deutschlandticketNoOnly connections fully valid with the Deutschlandticket (implies regional_only, no price)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A4.4/5.0
Behavior5/5

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

Beyond readOnlyHint, openWorldHint, and idempotentHint, the description discloses live bahn.de data, real-time delay notation ('(+7)', '(+1d)'), real-time platforms with `*_platform_changed`, cancellations, and the meaning of `alternative` as DB's re-route around a disruption. This adds substantial behavioral context that annotations alone do not provide.

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 is a strong front-loaded purpose statement. The second is a dense but purposeful field glossary using backticks and clear separators. It is long, but nearly every clause adds operational meaning for a complex output, so there is minimal waste.

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 a 17-parameter tool that already has an output schema and annotations, the description focuses on what structured data cannot express: real-time semantics, delay/platform-change notation, follow-up token usage, and the `alternative` reroute flag. Nothing essential for invoking the tool correctly is missing.

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 coverage is 82%, so the baseline is 3. The description adds only marginal parameter insight: price is 'None with Deutschlandticket' and depends on travellers/BahnCard, which is largely already captured in the schema descriptions. It does not meaningfully clarify the remaining input parameters beyond what the schema already documents.

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 opens with a specific verb+resource: 'Plan train connections between two stations with live bahn.de data.' It clearly distinguishes itself from station-board siblings like db_departures and db_arrivals by emphasizing origin-to-destination journeys, and it references downstream sibling tools (db_journey_offers, db_trip_details), making its role in the tool family unambiguous.

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?

The first sentence gives clear context: this tool is for planning train connections between two stations. It does not explicitly enumerate when-not-to-use alternatives such as db_departures, db_arrivals, or db_best_price, but the description's focus on connections plus the recon_token/journey_id handoffs provides partial routing guidance. This is clear context without formal exclusions.

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

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/capraCoder/db-fahrplan-mcp'

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