Skip to main content
Glama

get_train_announcements

Read-onlyIdempotent

Fetch live train departures or arrivals for a Swedish station by name or signature, including platform, estimated time, delay, cancellation, and deviation notes.

Instructions

Get live train departures or arrivals at a Swedish station: train number, operator, product (e.g. "Pendeltåg"), origin/destination, platform (track), advertised vs. estimated/actual time, delay in minutes, cancellation and deviation notes. Accepts a station name (e.g. "Göteborg C", "Stockholm") or a location signature; an ambiguous name returns an error listing the candidates. Covers a window from minutesBack before now to hoursAhead after now. Use get_train_messages for broader disruption notices (track work, faults) instead of per-train data. Times are ISO 8601, delays in minutes (positive = late). Returns an error result (isError: true) if TRAFIKVERKET_API_KEY is missing/invalid or the Trafikverket API is unreachable. Coverage: Sweden only (Trafikverket data).

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of trains to return (1-100)
stationYesStation name (e.g. "Göteborg C", "Stockholm") or location signature (e.g. "G", "Cst")
directionNo"departures" (default) or "arrivals" at the stationdepartures
hoursAheadNoHow many hours ahead of now to include (0.25-12)
minutesBackNoHow many minutes back from now to include, so just-left or delayed trains show up (0-120)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/openWorld annotations, it discloses error semantics (isError: true when TRAFIKVERKET_API_KEY is missing/invalid or the API is unreachable), ambiguity handling, data-source coverage, and output conventions (ISO 8601 times, positive delays = late). This is the kind of operational context annotations cannot carry.

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?

Front-loaded with the core purpose, then scope, alternative, formats, and error behavior. Dense and mostly waste-free, though the long field enumeration in the first sentence is the least essential part of the definition.

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?

For a read-only, no-output-schema query tool, it covers everything an agent needs: what it returns, input flexibility, ambiguity failure mode, time window semantics, format conventions, auth failure behavior, and geographic coverage.

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 coverage is 100%, so baseline is 3; the description adds real value by restating that 'station' accepts a name or location signature and that ambiguous names fail rather than guess, and by framing minutesBack/hoursAhead as the overall query window. It does not add format details for limit or direction, which the schema already covers.

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?

Specific verb + resource + scope: 'Get live train departures or arrivals at a Swedish station', followed by an enumerated set of returned fields (train number, operator, product, platform, delay, cancellations). It is clearly distinguishable from siblings because it names get_train_messages as the different tool for disruption notices.

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

Usage Guidelines5/5

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

Explicitly routes the agent: 'Use get_train_messages for broader disruption notices (track work, faults) instead of per-train data', and states the coverage boundary 'Sweden only'. It also tells the agent what happens with an ambiguous station name (error listing candidates), which pre-empts a common misuse.

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