Skip to main content
Glama

search_stations

Find Swiss public transport stations using name searches or coordinate-based location queries to access transport information.

Instructions

Search for Swiss public transport stations/stops by name or coordinates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoStation name to search for
xNoLongitude (WGS84)
yNoLatitude (WGS84)
typeNoFilter: all, station, poi, address

Implementation Reference

  • Handler logic for search_stations, which calls the transport API and formats the result.
    case "search_stations": {
      const url = buildUrl(`${BASE}/locations`, {
        query: args.query as string,
        x: args.x as number,
        y: args.y as number,
        type: args.type as string,
      });
      const data = await fetchJSON<{ stations: Station[] }>(url);
      return JSON.stringify(data.stations.map(slimStation));
    }
  • Schema definition for search_stations including input parameters.
    {
      name: "search_stations",
      description: "Search for Swiss public transport stations/stops by name or coordinates",
      inputSchema: {
        type: "object",
        properties: {
          query: { type: "string", description: "Station name to search for" },
          x: { type: "number", description: "Longitude (WGS84)" },
          y: { type: "number", description: "Latitude (WGS84)" },
          type: { type: "string", description: "Filter: all, station, poi, address" },
        },
      },
    },

Tool Definition Quality

Score is being calculated. Check back soon.

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