Skip to main content
Glama

Bahn-Zuverlässigkeits-MCP

compensation_calculator

Read-onlyIdempotent

Calculate the compensation a passenger is owed for a delayed German train under EU regulation 2021/782 / DB Fahrgastrechte: 25% of the fare from 60 minutes delay, 50% from 120 minutes. Season tickets (except BahnCard 100) collect delays of 20+ minutes and pay one flat rate per full 60 minutes of total delay; BahnCard 100 pays one flat rate per delay case of 60+ minutes. Returns gross amount, payout (after the 4 EUR minimum) and the applied rate.

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": {
      "ticket_type": "<ticket_type>",
      "delay_minutes": "<delay_minutes>"
    },
    "name": "compensation_calculator"
  }
}

Input Schema

NameRequiredDescriptionDefault
fare_eurNoFare paid in EUR (required for single tickets)
delay_countNoNumber of like delays of "delay_minutes" each to combine (season tickets, default 1). Non-BahnCard-100: their minutes are summed (each must be 20+); BahnCard 100: counted as cases (each must be 60+).
season_typeNoSeason-ticket segment (required for season tickets)
ticket_typeYes"single" for normal tickets, "season" for Zeitkarte/Abo/BahnCard 100
travel_classNoTravel class (default: "2")2
delay_minutesYesDelay at the destination in minutes
round_trip_totalNotrue if fare_eur is the TOTAL for a round trip (basis is halved)
ticket_value_eurNoSeason-ticket value in EUR — payouts are capped at 25% of it

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description goes beyond that by disclosing the actual decision rules (20+ min collection, flat rate per full 60 min, BahnCard 100 case-counting) and by stating the return payload: gross amount, payout after the 4 EUR minimum, and applied rate. It does not mention rounding or currency handling, keeping it at 4.

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?

Front-loaded with the core rule, then the season-ticket exceptions, then the return shape — a logical progression with no filler sentences. Density is justified because each clause encodes a distinct regulatory branch.

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?

For an 8-parameter, 100%-schema-covered, output-schema-backed tool, the description supplies the domain logic an agent needs to pick correct arguments. Its only redundancy is restating return values that the output schema already defines; otherwise nothing material 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 100%, so every parameter is already documented in the schema, and the description largely restates the same rules (season ticket thresholds, BahnCard 100). It adds some business meaning by tying delay thresholds to rate tiers, but says nothing about travel_class, round_trip_total, or ticket_value_eur caps. Baseline 3 applies.

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+resource ('Calculate the compensation a passenger is owed') and scopes it precisely to delayed German trains under EU regulation 2021/782 / DB Fahrgastrechte. The rate structure (25% from 60 min, 50% from 120 min) immediately separates it from the sibling statistics tools (chaos_index, route_punctuality, etc.).

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 legal/operational framing makes the use case clear: computing an owed payout given ticket type and delay. It also implicitly excludes the sibling tools by dealing with a single claim rather than aggregate punctuality data. There is no explicit 'do not use for X' clause, so it falls short of a 5.

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.

Resources