Skip to main content
Glama

get_nearby_stations

Find Swiss public transport stations near specific coordinates by providing longitude and latitude. Returns stations within a specified distance limit.

Instructions

Find Swiss public transport stations near given coordinates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesLongitude (WGS84)
yYesLatitude (WGS84)
limitNoNumber of results (default: 10)
distanceNoMax distance in meters

Implementation Reference

  • The handler implementation for get_nearby_stations, which calls the locations endpoint with coordinates.
    case "get_nearby_stations": {
      const url = buildUrl(`${BASE}/locations`, {
        x: args.x as number,
        y: args.y as number,
        type: "station",
      });
      const data = await fetchJSON<{ stations: Station[] }>(url);
      return JSON.stringify(data.stations.map(slimStation));
    }
  • The schema definition for get_nearby_stations tool.
      name: "get_nearby_stations",
      description: "Find Swiss public transport stations near given coordinates",
      inputSchema: {
        type: "object",
        required: ["x", "y"],
        properties: {
          x: { type: "number", description: "Longitude (WGS84)" },
          y: { type: "number", description: "Latitude (WGS84)" },
          limit: { type: "number", description: "Number of results (default: 10)" },
          distance: { type: "number", description: "Max distance in meters" },
        },
      },
    },
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. While it indicates this is a query/find operation (implied read-only), it doesn't mention important behavioral aspects like rate limits, authentication requirements, response format, error conditions, or whether results are sorted by distance. For a location-based query tool with no annotation coverage, this represents significant gaps in behavioral transparency.

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 perfectly concise at just 7 words: 'Find Swiss public transport stations near given coordinates'. Every word earns its place - it specifies the action, resource type, geographic scope, and location input format. There's zero waste or redundancy, and the meaning is front-loaded in a single efficient sentence.

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

Completeness3/5

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

Given the tool's moderate complexity (location-based query with 4 parameters) and the absence of both annotations and output schema, the description is minimally adequate but incomplete. It tells what the tool does but lacks crucial context about return values (no output schema), behavioral constraints, and differentiation from similar tools. The description would need to compensate more for the missing structured information to achieve a higher score.

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?

With 100% schema description coverage, the input schema already documents all four parameters thoroughly (x as longitude, y as latitude, limit with default, distance in meters). The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain coordinate systems, distance calculation methods, or result ordering. The baseline score of 3 is appropriate when the schema does all the parameter documentation work.

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: 'Find Swiss public transport stations near given coordinates'. It specifies the verb ('Find'), resource ('Swiss public transport stations'), and scope ('near given coordinates'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'search_stations' or 'get_traffic_nearby', 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 many sibling tools available (including 'search_stations' and 'get_traffic_nearby'), there's no indication of when this specific nearby-station-finding tool is appropriate versus other station-related or location-based tools. The description simply states what it does without contextual usage information.

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/vikramgorla/mcp-swiss'

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