Skip to main content
Glama

search_trips

Find train trips between stations with pricing, schedules, and connection details for route planning in the Netherlands.

Instructions

Search for train trips between two stations with pricing information.

This is the main tool for route planning. It returns trip options with detailed information about connections, travel times, and prices.

Args: origin: Origin station code (e.g., "ut" for Utrecht, "asd" for Amsterdam). Use search_stations to find codes. destination: Destination station code (e.g., "rtd" for Rotterdam). Use search_stations to find codes. date_time: Departure/arrival date and time in ISO format (e.g., "2025-11-18T14:30:00"). Defaults to current time. search_for_arrival: If true, date_time is treated as arrival time. If false (default), it's departure time. via_station: Optional intermediate station code to route through travel_class: Travel class - either "first" or "second" (default: "second") discount: Discount type - "none" (default), "20_percent", or "40_percent" num_trips: Number of trip options to return (default: 5)

Returns: A dictionary containing: - trips: List of trip options, each with: - duration_minutes: Total travel time - transfers: Number of transfers required - departure_time: Planned departure time - arrival_time: Planned arrival time - status: Trip status (e.g., "NORMAL", "CANCELLED") - legs: List of individual journey segments - price: Fare information in cents and formatted - origin: Origin station name - destination: Destination station name

Example: search_trips(origin="ut", destination="asd", num_trips=3) search_trips(origin="rtd", destination="ams", date_time="2025-11-20T09:00:00", travel_class="first")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
originYes
destinationYes
date_timeNo
search_for_arrivalNo
via_stationNo
travel_classNosecond
discountNonone
num_tripsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries full burden and does well by detailing what the tool returns (trip options with specific fields like duration, transfers, status, price), default behaviors (e.g., date_time defaults to current time), and practical usage notes (e.g., using search_stations for codes). It doesn't mention rate limits or authentication needs, but covers core behavior adequately.

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?

The description is well-structured with clear sections (purpose, args, returns, example) and front-loaded key information. It's appropriately sized but could be slightly more concise by integrating the example more tightly or trimming some redundancy in parameter explanations.

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?

Given the complexity (8 parameters, no annotations, but has output schema), the description is highly complete. It covers purpose, usage, all parameters with semantics, return structure, and examples. The output schema exists, so the description appropriately focuses on explaining the return values' meaning rather than just structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate fully. It provides detailed semantics for all 8 parameters: examples (e.g., 'ut' for Utrecht), explanations (e.g., search_for_arrival controls date_time interpretation), default values, and valid options (e.g., travel_class values). This adds significant value beyond the bare schema.

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 clearly states the tool's purpose as 'Search for train trips between two stations with pricing information' and identifies it as 'the main tool for route planning.' It distinguishes from sibling tools by specifying it returns trip options with connections, travel times, and prices, unlike get_departures (likely real-time departures) and search_stations (station lookup).

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?

The description provides clear context by stating this is 'the main tool for route planning' and includes guidance on using search_stations to find station codes for parameters. However, it doesn't explicitly state when to use this vs. get_departures (e.g., for planning vs. real-time info) or any exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/eze-godoy/mcp-server-ns-bridge'

If you have feedback or need assistance with the MCP directory API, please join our Discord server