Skip to main content
Glama

Search train routes

search_routes
Read-onlyIdempotent

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 changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / limit / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / limit / minimum
      Added value: +-9007199254740991
  2. Changed1 schema field changed
    • changedInput schema / properties / category / enum
      Previous value: -[
      -  "high-speed",
      -  "classic",
      -  "night",
      -  "scenic",
      -  "heritage",
      -  "funicular",
      -  "luxury"
      -]New value: +[
      +  "high-speed",
      +  "classic",
      +  "night",
      +  "scenic",
      +  "heritage",
      +  "mountain",
      +  "luxury"
      +]
  3. Changed1 schema field changed
    • changedInput schema / properties / category / enum
      Previous value: -[
      -  "high-speed",
      -  "classic",
      -  "night",
      -  "scenic",
      -  "luxury"
      -]New value: +[
      +  "high-speed",
      +  "classic",
      +  "night",
      +  "scenic",
      +  "heritage",
      +  "funicular",
      +  "luxury"
      +]
  4. Changed1 schema field changed
    • changedInput schema / properties / category / enum
      Previous value: -[
      -  "high-speed",
      -  "classic",
      -  "night",
      -  "scenic"
      -]New value: +[
      +  "high-speed",
      +  "classic",
      +  "night",
      +  "scenic",
      +  "luxury"
      +]
  5. Changed4 schema fields changed
    • changedInput schema / properties / category / description
      Previous value: -"Filter by route category"New value: +"Only routes in this category."
    • changedInput schema / properties / country / description
      Previous value: -"Country name or ISO code (e.g. \"Switzerland\" or \"CH\")"New value: +"Only routes crossing this country — full name or 2-letter ISO code (\"Switzerland\" or \"CH\")."
    • changedInput schema / properties / limit / description
      Previous value: -"Max results (default 10, max 50)"New value: +"Max routes returned. Default 10, max 50."
    • changedInput schema / properties / query / description
      Previous value: -"Free text: route name, city, train or operator (e.g. \"glacier\", \"Tokyo\", \"Amtrak\")"New value: +"Free text matched against name, cities, train, operator and countries — e.g. \"glacier\", \"Tokyo\", \"Amtrak\". Omit to browse all routes by renown."
  6. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint=false, so safety is covered. The description adds meaningful behavior beyond that: accent-insensitive matching, every query word must match, results sorted by renown with route-name matches first, and the whole atlas returned when no query is supplied.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but front-loaded, starting with the core search behavior and then covering matching semantics, result shape, and alternatives. Every sentence contributes information an agent needs for selection or invocation.

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?

Although there is no output schema, the description summarizes the return format as compact per-route facts with id and URL, sorted by renown. Combined with explicit routing to sibling tools and a clear statement of no-query behavior, it is complete for this search tool.

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 the baseline is 3. The description still adds value by explaining that query terms are matched together with all-words-must-match semantics and accent-insensitivity, and by clarifying the no-query browse mode and result ordering beyond the per-parameter schema text.

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 states a specific verb and resource: free-text search over every route in the World Train Map atlas, matching route name, cities, train, operator, and countries. It is clearly distinct from sibling tools such as get_route, famous_routes, and city_pair.

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?

It explicitly names alternatives and when to use them: get_route for full detail with a returned id, famous_routes for a ready-made top list, and city_pair for A-to-B journey times. It also explains the no-query browse case, leaving little ambiguity about when to select this tool.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.