Skip to main content
Glama
KallivdH

NS Travel Information Server

by KallivdH

get_ovfiets

Check real-time availability of OV-fiets rental bikes at Dutch train stations to plan your onward journey from the station.

Instructions

Get OV-fiets availability at a train station

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stationCodeYesStation code to check OV-fiets availability for (e.g., ASD for Amsterdam Centraal)

Implementation Reference

  • The core handler function that executes the tool logic by querying the NS Places API (/places-api/v2/ovfiets) for OV-fiets bike availability at the given station code.
    async getOVFiets(args: GetOVFietsArgs): Promise<OVFietsResponse> {
      this.ensureApiKeyConfigured();
      const response = await this.axiosInstance.get<OVFietsResponse>(
        NSApiService.ENDPOINTS.OVFIETS,
        {
          params: {
            station_code: args.stationCode
          }
        }
      );
      return response.data;
    }
  • TypeScript interface defining the input arguments (stationCode: string) and type guard function for validating get_ovfiets tool inputs.
    export interface GetOVFietsArgs {
      stationCode: string;
    }
    
    export function isValidOVFietsArgs(args: unknown): args is GetOVFietsArgs {
      if (!args || typeof args !== "object") {
        return false;
      }
    
      const typedArgs = args as Record<string, unknown>;
      return typeof typedArgs.stationCode === "string";
    }
  • src/index.ts:136-147 (registration)
    Tool registration in the stdio server (src/index.ts), including name, description, and input schema advertised to MCP clients.
    name: 'get_ovfiets',
    description: 'Get OV-fiets availability at a train station',
    inputSchema: {
      type: 'object',
      properties: {
        stationCode: {
          type: 'string',
          description: 'Station code to check OV-fiets availability for (e.g., ASD for Amsterdam Centraal)',
        }
      },
      required: ['stationCode']
    }
  • Tool registration in the HTTP server (src/http-server.ts), including name, description, and input schema advertised to MCP clients.
      name: 'get_ovfiets',
      description: 'Get OV-fiets availability at a train station',
      inputSchema: {
        type: 'object',
        properties: {
          stationCode: {
            type: 'string',
            description: 'Station code to check OV-fiets availability for (e.g., ASD for Amsterdam Centraal)',
          }
        },
        required: ['stationCode']
      }
    },
  • Dispatch handler in HTTP server that validates args and calls the NSApiService.getOVFiets method.
    case 'get_ovfiets': {
      if (!isValidOVFietsArgs(rawArgs)) {
        throw ResponseFormatter.createMcpError(
          ErrorCode.InvalidParams,
          'Invalid arguments for get_ovfiets'
        );
      }
      const data = await this.nsApiService.getOVFiets(rawArgs);
      return ResponseFormatter.formatSuccess(data);
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states what the tool does without detailing behavioral traits like response format, error handling, rate limits, or whether it's a read-only operation. This leaves significant gaps in understanding how the tool behaves in practice.

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, clear sentence that efficiently conveys the tool's purpose without unnecessary words. It is front-loaded and appropriately sized, making it easy to understand at a glance.

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 lack of annotations and output schema, the description is incomplete for a tool that likely returns availability data. It does not explain what the output includes (e.g., number of bikes, timestamps) or handle potential complexities, leaving the agent with insufficient context to use the tool effectively.

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?

The input schema has 100% description coverage, so the schema already documents the 'stationCode' parameter with an example. The description does not add any additional meaning or context beyond what the schema provides, such as explaining the format of station codes or availability data, resulting in a baseline score of 3.

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 tool's purpose with a specific verb ('Get') and resource ('OV-fiets availability at a train station'), making it immediately understandable. However, it does not explicitly differentiate from sibling tools like 'get_station_info', which might also provide station-related data but for different aspects.

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. It does not mention sibling tools or specify contexts where this tool is preferred, such as for checking bike availability versus other station information tools like 'get_arrivals' or 'get_station_info'.

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