Skip to main content
Glama

get_traffic_count

Retrieve traffic volume data from ASTRA counting stations in Switzerland. Provides daily and weekday counts, heavy vehicle percentages, and measurement year for specific locations.

Instructions

Get traffic volume at an ASTRA counting station in Switzerland by location name (e.g. 'Gotthard', 'Zürich', 'Genf'). Returns daily and weekday traffic counts, heavy vehicle percentage, and measurement year.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
locationYesStation or location name to search (e.g. 'Gotthard', 'Zürich', 'Basel')

Implementation Reference

  • The switch case handler implementation for the get_traffic_count tool.
    case "get_traffic_count": {
      const location = args.location as string;
      const url = buildUrl(`${GEO_ADMIN}/find`, {
        layer: TRAFFIC_LAYER,
        searchText: location,
        searchField: "mlocname",
        returnGeometry: false,
      });
      const data = await fetchJSON<FindResponse>(url);
      const stations = data.results.map(slimTrafficStation);
      return JSON.stringify({
        count: stations.length,
        query: location,
        stations,
        source: "ASTRA — Federal Roads Office (Bundesamt für Strassen)",
      });
    }
  • The tool definition including the inputSchema for get_traffic_count.
    {
      name: "get_traffic_count",
      description:
        "Get traffic volume at an ASTRA counting station in Switzerland by location name (e.g. 'Gotthard', 'Zürich', 'Genf'). Returns daily and weekday traffic counts, heavy vehicle percentage, and measurement year.",
      inputSchema: {
        type: "object",
        required: ["location"],
        properties: {
          location: {
            type: "string",
            description: "Station or location name to search (e.g. 'Gotthard', 'Zürich', 'Basel')",
          },
        },
      },
    },

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