Skip to main content
Glama

Search trails

search_trails
Read-onlyIdempotent

Find U.S. rail-trails, canal towpaths and greenways by name, state, surface, kind and length. Returns each trail's page URL and slug (for get_trail). With no query, lists the longest trails that match the filters.

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_trails"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNorail: on a former railway; trolley: an old streetcar or interurban line; canal_towpath: beside a canal; greenway: a car-free path not on a railbed.
limitNoHow many trails to return (1-50).
queryNoWords from the trail's name, for example "Great Allegheny Passage" or "Virginia Creeper". Small typos are tolerated.
stateNoTwo-letter state code (PA) or state name. Matches every trail that enters the state.
surfaceNoTrail surface. crushed_stone is packed stone dust, good for most bikes.
max_milesNoLongest length, in miles.
min_milesNoShortest length, in miles.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish that this is a read-only, idempotent, non-destructive search. The description adds useful behavior beyond them: it returns each trail's page URL and slug and defines the default ordering when query is omitted. It does not mention pagination beyond the schema's limit parameter, but no contradiction exists.

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?

Two compact sentences with the primary capability front-loaded, followed by the return values and the no-query behavior. Every sentence carries operational value.

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?

For a search tool with full schema coverage, annotations, and no output schema, the description covers filters, return values, and default behavior sufficiently to call it correctly. The main remaining gap is sibling routing, especially versus trails_near.

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%, with all seven parameters documented, including enum meanings and length bounds. The description names the filter dimensions but adds no syntax or interpretation beyond the schema, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb and resource: finds U.S. rail-trails, canal towpaths, and greenways, with the searchable dimensions and a downstream get_trail pointer. It is clear what the tool does, but it does not distinguish itself from trails_near, the closest sibling for location-based discovery.

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?

Provides clear usage context: filter by name, state, surface, kind, and length, and with no query it lists the longest matching trails. It does not explicitly say when to use trails_near or list_closures instead, so the alternative-selection guidance is incomplete.

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.

Resources