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 and traffic type for Swiss and European operators including SBB, BLS, SOB, and DB.

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive behavior. The description adds return schema details and operator coverage, which is useful but 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 a summary, operator list, args, and returns. It is reasonably concise but contains some redundancy with schema field descriptions.

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?

The description is complete for a read-only data retrieval tool with a rich input schema and known output schema. It covers purpose, parameters, and expected output fields.

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?

The input schema has 0% description coverage at the top level, but the description's docstring explains each parameter (line_name, operator, year, etc.), adding meaning beyond the schema's nested descriptions.

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 clearly states the tool retrieves train counts per line segment and traffic type, listing covered operators and distinguishing from sibling tools like passenger frequency or disruptions.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives. While sibling tools are different, the description lacks context for selection criteria.

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