Skip to main content
Glama

Search train routes

search_routes
Read-onlyIdempotent

Search train routes by route name, city, train, operator, or country, with optional category and country filters; returns route facts, IDs, and map links.

Instructions

Free-text search over every route in the World Train Map atlas — matches route name, cities, train name, operator and countries, with optional category/country filters. Accent-insensitive; every word of the query must match. Returns compact per-route facts with id and worldtrainmap.com URL, sorted by renown with route-name matches first; with no query it lists the whole atlas by renown. Use get_route with a returned id for full detail, famous_routes for a ready-made top list, city_pair for A-to-B journey times.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search_routes"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax routes returned. Default 10, max 50.
queryNoFree text matched against name, cities, train, operator and countries — e.g. "glacier", "Tokyo", "Amtrak". Omit to browse all routes by renown.
countryNoOnly routes crossing this country — full name or 2-letter ISO code ("Switzerland" or "CH").
categoryNoOnly routes in this category.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.2.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / limit / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / limit / minimum
      Added value: +-9007199254740991
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: accent-insensitive matching, AND semantics across query words, sort order (renown, with route-name matches first), the no-query browse behavior, and the response shape (compact facts with id and worldtrainmap.com URL). This is exactly the behavioral context an agent needs before calling.

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-loads purpose, then matching rules, then return shape, then sibling routing — a sensible order with no filler. The middle sentence is dense with clauses, but each carries information rather than repetition.

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 correctly covers return values and sort order; with zero required parameters it explains the no-query default. Nothing needed to call the tool correctly is missing given the annotations already cover the read-only profile.

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, but the description adds real meaning: that every word of the query must match, that matching is accent-insensitive, and that omitting the query browses the whole atlas. Those semantics aren't expressed in the parameter 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?

States a specific verb and resource ("Free-text search over every route in the World Train Map atlas") plus the exact fields matched, so an agent can distinguish it from get_route or routes_in_country without reading the schema. Scope is unambiguous.

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?

Explicitly routes the agent to three alternatives with conditions: get_route for full detail, famous_routes for a ready-made top list, city_pair for A-to-B times. It never addresses the closest overlapping sibling, routes_in_country, which competes with the country filter parameter — that omission keeps it from a 5.

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