Skip to main content
Glama

search_stations

Read-onlyIdempotent

Look up Swedish train stations by name or location signature to get the exact code, county and coordinates needed for train queries, including distance from a given latitude and longitude.

Instructions

Find Swedish train stations by name or location signature. Returns each station's display name, location signature (the short code used by the other train tools, e.g. "Cst" for Stockholm Central), county codes and coordinates; pass latitude/longitude to also get the distance to each match. Use this to look up the exact station before calling get_train_announcements when a name is ambiguous. 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 stations to return (1-25)
queryYesStation name or part of it (e.g. "Göteborg", "Lund"), or a location signature (e.g. "Cst")
latitudeNoOptional: latitude, to include distance to each match
longitudeNoOptional: longitude, to include distance to each match

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent safety, but the description adds what the annotations cannot: the returned fields, that passing latitude/longitude adds distance to each match, and that failures surface as isError: true for a missing/invalid TRAFIKVERKET_API_KEY or an unreachable API. That is substantial context beyond structured data.

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?

Purpose is front-loaded in the first sentence, and each subsequent clause carries real information (return shape, distance option, error behavior, coverage). It is dense but slightly long; the return-field enumeration could be tightened.

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?

With no output schema, the description still explains the result shape, the optional distance enrichment, error semantics, and the auth prerequisite. Nothing an agent needs to call it correctly and interpret failures 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 description coverage is 100%, so all four parameters are already documented. The description explains the latitude/longitude distance behavior but only repeats what the schema says and never addresses `limit`, so it adds little over the schema — 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 and resource ('Find Swedish train stations') plus the two lookup keys (name or location signature) and the geographic scope. An agent can distinguish it from the announcement/message/road siblings without opening any schema.

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?

Gives an explicit when-to-use rule — 'look up the exact station before calling get_train_announcements when a name is ambiguous' — naming the downstream sibling. The 'Coverage: Sweden only' line and the API-key error note act as clear boundary conditions.

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