Skip to main content
Glama
malkreide

SBB Open Data MCP Server

by malkreide

sbb_get_trains_per_segment

Read-onlyIdempotent

Retrieve train counts per railway segment, filtered by operator, line, year, and traffic type. Query passenger or freight traffic data for Swiss and European infrastructure operators.

Instructions

Ruft Anzahl Züge pro Streckenabschnitt und Verkehrstyp ab.

Deckt SBB, BLS, SOB, DB und weitere Infrastrukturbetreiberinnen ab. Enthält Personenverkehr und Güterverkehr, Trassenkilometer und Stromverbrauch.

Args: params (TrainsPerSegmentInput): Parameter: - line_name (Optional[str]): Streckenbezeichnung (Teilsuche) - operator (Optional[str]): Infrastrukturbetreiberin, z.B. 'SBB', 'BLS' - year (Optional[str]): Jahr, z.B. '2025' - traffic_type (Optional[str]): 'Personenverkehr' oder 'Gueterverkehr' - limit (int): Max. Resultate - offset (int): Paginierung - response_format (str): 'markdown' oder 'json'

Returns: str: Zugzahlen pro Streckenabschnitt mit Operator und Traffiktyp. Schema: {segment, line, operator, year, train_count, traffic_type, track_km}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false. The description adds context about data coverage (operators, traffic types, track_km, Stromverbrauch) and the return schema, but does not disclose additional behavioral traits such as pagination behavior or rate limits. It does not contradict annotations.

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 description is well-structured with an introductory paragraph, a bulleted Args list, and a Returns section. Every part is relevant, though it could be slightly trimmed. Minor typos (e.g., 'Traffiktyp') do not hinder clarity.

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?

With no output schema, the description provides a return schema and parameter meanings, covering all key aspects for a read-only data retrieval tool. It does not explain defaults or enum constraints, but those are present in the input schema. Overall, it is sufficiently complete for the tool's complexity.

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?

Despite the signal of 0% schema description coverage, the tool description manually enumerates all seven parameters within the nested params object with meaningful explanations (e.g., line_name for partial match, operator examples, traffic_type values, limit/offset for pagination, response_format options). This fully compensates 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?

The description starts with 'Ruft Anzahl Züge pro Streckenabschnitt und Verkehrstyp ab' – a specific verb (abrufen) and resource (train counts per segment and traffic type). It clearly distinguishes from siblings like sbb_get_passenger_frequency by focusing on train counts and infrastructure operators.

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

Usage Guidelines3/5

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

The description implies usage for retrieving train counts per segment across operators (SBB, BLS, etc.) and traffic types, but it does not explicitly mention when to use this tool over alternatives or any exclusions. There is no reference to sibling tools or specific use-case boundaries.

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/sbb-opendata-mcp'

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