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
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Station name or code to search for | |
| includeNonPlannableStations | No | Include stations where trains do not stop regularly | |
| limit | No | Maximum number of results to return |
Implementation Reference
- src/services/NSApiService.ts:108-121 (handler)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; }
- src/types.ts:408-421 (schema)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)) ); }
- src/types.ts:465-467 (schema)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'] } },
- src/http-server.ts:277-302 (registration)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'] } },