Skip to main content
Glama
KallivdH

NS Travel Information Server

by KallivdH

get_station_info

Retrieve detailed Dutch railway station information including schedules, delays, and service details to plan train travel in the Netherlands.

Instructions

Get detailed information about a train station

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesStation name or code to search for
includeNonPlannableStationsNoInclude stations where trains do not stop regularly
limitNoMaximum number of results to return

Implementation Reference

  • Core implementation of the get_station_info tool handler, which queries the NS stations API endpoint with the provided query, optional flags, and limit.
    async getStationInfo(args: StationInfoArgs): Promise<StationInfoResponse> {
      this.ensureApiKeyConfigured();
      const response = await this.axiosInstance.get<StationInfoResponse>(
        NSApiService.ENDPOINTS.STATIONS,
        {
          params: {
            q: args.query,
            includeNonPlannableStations: args.includeNonPlannableStations ?? false,
            limit: args.limit ?? 10
          }
        }
      );
      return response.data;
    }
  • TypeScript interface definition and type guard validator for the input arguments of get_station_info.
    export interface StationInfoArgs {
      query: string;
      includeNonPlannableStations?: boolean;
      limit?: number;
    }
    
    export function isValidStationInfoArgs(args: any): args is StationInfoArgs {
      return (
        typeof args === 'object' &&
        typeof args.query === 'string' &&
        (args.includeNonPlannableStations === undefined || typeof args.includeNonPlannableStations === 'boolean') &&
        (args.limit === undefined || (typeof args.limit === 'number' && args.limit >= 1 && args.limit <= 50))
      );
    }
  • TypeScript interface definition for the output response of get_station_info.
    export interface StationInfoResponse {
      payload: Station[];
    }
  • src/index.ts:149-174 (registration)
    MCP tool registration in the stdio server (index.ts), including name, description, and JSON input schema.
    {
      name: 'get_station_info',
      description: 'Get detailed information about a train station',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'Station name or code to search for',
          },
          includeNonPlannableStations: {
            type: 'boolean',
            description: 'Include stations where trains do not stop regularly',
            default: false
          },
          limit: {
            type: 'number',
            description: 'Maximum number of results to return',
            minimum: 1,
            maximum: 50,
            default: 10
          }
        },
        required: ['query']
      }
    },
  • MCP tool registration in the HTTP server (http-server.ts), including name, description, and JSON input schema.
    {
      name: 'get_station_info',
      description: 'Get detailed information about a train station',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'Station name or code to search for',
          },
          includeNonPlannableStations: {
            type: 'boolean',
            description: 'Include stations where trains do not stop regularly',
            default: false
          },
          limit: {
            type: 'number',
            description: 'Maximum number of results to return',
            minimum: 1,
            maximum: 50,
            default: 10
          }
        },
        required: ['query']
      }
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states it 'gets' information (implying a read operation) but doesn't mention any behavioral traits like rate limits, authentication needs, error handling, or what 'detailed information' entails (e.g., format, completeness). This leaves significant gaps for an agent to understand how to use it effectively.

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 a single, efficient sentence that directly states the tool's purpose without any wasted words. It's appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no annotations and no output schema, the description is incomplete. It doesn't explain what 'detailed information' includes (e.g., station facilities, location, services), how results are structured, or any limitations (e.g., data freshness, availability). For a tool with 3 parameters and no structured output, this leaves too much ambiguity for reliable agent use.

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%, meaning all parameters are documented in the schema itself. The description doesn't add any meaning beyond what the schema provides (e.g., it doesn't explain how 'query' interacts with station codes vs. names or clarify 'detailed information' in relation to parameters). Baseline 3 is appropriate as the schema does the heavy lifting.

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?

The description clearly states the verb ('Get') and resource ('detailed information about a train station'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from siblings like 'get_arrivals' or 'get_departures' that also involve station data, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_arrivals' and 'get_departures' that might overlap in station-related queries, there's no indication of when this tool is preferred or what specific 'detailed information' it provides that others don't.

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/KallivdH/ns-mcp-server'

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