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" },
        },
      },
    },

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