Skip to main content
Glama

Train ticket price

mb_train_price
Read-onlyIdempotent

Get exact price for one train class using its class_id from a search: per adult, child, infant, foreigner, empty berth, and the party total.

Instructions

Exact price of one train class for a party: per adult, child, infant, foreigner and empty berth, and the total.

class_id comes from mb_search_trains (it expires with the search). A sold-out class still returns a price here, so check seats_left in the search first. breakdown is the adult fare's parts (they do not add up exactly to the price; the price is what is paid).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
adultsNoAdults (12+).
infantsNoInfants (under 2).
childrenNoChildren (2-11).
class_idYesclass_id of a train class from a fresh mb_search_trains result, e.g. 9847134.
foreignersNoForeign passengers (priced separately).
empty_seatsNoEmpty berths to buy for a whole (exclusive) compartment, e.g. 1 for 3 people in a 4-berth.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already establish that this is a safe, idempotent, read-only lookup, and the description adds genuinely non-obvious behavior: class_id expiry, prices returned even for sold-out classes, and the warning that breakdown components do not sum exactly to the price because the price is what is actually paid. These are exactly the surprises an agent needs surfaced before calling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with what the tool returns before the prerequisites and caveats. Every sentence carries information: the price composition, the input provenance, and the sold-out/gap-in-breakdown warnings.

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 no explanation, and the description still covers the two things an agent must know to call correctly: where class_id comes from and its expiry, and the sold-out caveat. Nothing material is missing for a six-parameter pricing lookup.

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 description coverage is 100%, so the per-parameter meanings (adult, child, infant, foreigner, empty berth) are already documented; the description adds aggregation semantics — that the returned figure is per party category plus a total — which the schema does not express. Modest but real value above the baseline.

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 — the exact price of one train class for a party — and enumerates what the price breaks down into (adult, child, infant, foreigner, empty berth, total). An agent can tell this apart from mb_search_trains, but nothing explicitly distinguishes it from the sibling mb_train_price_calendar, which is the nearest competing option.

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?

Gives a concrete prerequisite (class_id must come from a fresh mb_search_trains result, since it expires with the search) and an important caveat (a sold-out class still returns a price, so check seats_left in the search first). It stops short of naming an explicit exclusion or alternative for calendar-style pricing.

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