Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
NS_API_KEYYesThe NS API subscription key obtained from the NS API Portal (https://apiportal.ns.nl/).

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_stations

Search for train stations by name or filter by country.

Use this tool to find station codes needed for trip planning.

Args: query: Search query for station name (minimum 2 characters). Leave empty to list all stations. country_codes: Comma-separated country codes to filter (e.g., "nl,de,be"). Common codes: nl (Netherlands), de (Germany), be (Belgium) limit: Maximum number of results to return (default: 10, max: 100)

Returns: A dictionary containing: - stations: List of matching stations with their codes and locations - count: Number of stations returned

Example: search_stations(query="Amsterdam", limit=5) search_stations(country_codes="nl", limit=20)

search_trips

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")

get_departures

Get upcoming train departures for a specific station.

Use this to check the departure board at a station, including real-time updates about delays, cancellations, and platform changes.

Args: station: Station code (e.g., "ut" for Utrecht Centraal). Use search_stations to find codes. max_journeys: Maximum number of departures to return (default: 10, max: 40) date_time: Date and time to show departures from in ISO format. Defaults to current time.

Returns: A dictionary containing: - station: Station code - departures: List of departures with: - direction: Destination of the train - name: Train identification (e.g., "Intercity 2800") - planned_time: Scheduled departure time - actual_time: Actual departure time (if different) - planned_track: Scheduled platform - actual_track: Actual platform (if changed) - cancelled: Whether the departure is cancelled - delay_minutes: Delay in minutes (if applicable) - count: Number of departures returned

Example: get_departures(station="ut", max_journeys=5) get_departures(station="asd", date_time="2025-11-20T08:00:00")

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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