Skip to main content
Glama
malkreide

swiss-transport-mcp

by malkreide

get_ticket_price

Read-onlyIdempotent

Get ticket prices for Swiss public transport connections. Enter origin, destination, travel class, and departure time to receive fare and route details.

Instructions

Ticketpreise für eine ÖV-Verbindung in der Schweiz abfragen.

Berechnet den Fahrpreis für eine Verbindung inklusive Routeninformation. Zeigt reguläre Tarife an. Rabatte (Halbtax, GA) sind möglicherweise nicht vollständig berücksichtigt.

Args: origin: Abfahrtsort (z.B. "Zürich HB", "Wädenswil", "Bern") destination: Ankunftsort (z.B. "Bern", "Luzern", "Basel SBB") departure_time: Abfahrtszeit im Format YYYY-MM-DDTHH:MM (z.B. "2026-03-01T08:00"). Standard: jetzt. travel_class: Reiseklasse. "first" = 1. Klasse, "second" = 2. Klasse.

Beispiele: - Einfache Preisabfrage: get_ticket_price(origin="Zürich HB", destination="Bern") - Mit Zeitangabe: get_ticket_price(origin="Wädenswil", destination="Luzern", departure_time="2026-03-01T08:00") - 1. Klasse: get_ticket_price(origin="Basel SBB", destination="Genf", travel_class="first")

Hinweis: Für verbindliche Preise immer sbb.ch oder den Schalter konsultieren.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
originYes
destinationYes
travel_classNosecond
departure_timeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations declare readOnlyHint=true, destructiveHint=false, idempotentHint=true. Description adds valuable caveat that discounts may not be fully considered and that route info is included. No contradictions.

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?

Well-structured with Args, examples, and a note. Each sentence adds value, though slightly verbose. Front-loaded with main purpose.

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?

Covers purpose, parameters, usage notes, and caveats. Output schema exists, so return values need not be described. Missing explicit when-to-use compared to siblings, but overall sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has no property descriptions (0% coverage). Description fully explains each parameter with format, examples, and defaults, compensating completely for the schema gap.

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?

Description clearly states purpose: query ticket prices for Swiss public transport connections, including fare calculation and route info. Specific verb 'abfragen' and resource 'Ticketpreise' distinguish it from sibling tools like transport_trip_plan.

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?

Provides examples and a note about consulting sbb.ch for binding prices. Implies usage for price queries via examples, but does not explicitly contrast with sibling tools or state when not to use.

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/malkreide/swiss-transport-mcp'

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