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')",
          },
        },
      },
    },
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the return data (daily/weekday counts, heavy vehicle percentage, measurement year) and the geographic scope (Switzerland), but it lacks details on error handling, rate limits, or data freshness. It does not contradict any annotations.

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, well-structured sentence that efficiently conveys the tool's function, input, and output without any wasted words. It is front-loaded with the core action and includes all necessary details concisely.

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

Completeness4/5

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

Given the tool's low complexity (1 parameter, no annotations, no output schema), the description is reasonably complete. It covers purpose, input examples, and return data. However, it could improve by addressing behavioral aspects like error cases or data limitations, which would enhance completeness for an agent.

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 schema description coverage is 100%, so the schema already documents the 'location' parameter. The description adds minimal value by providing example values ('Gotthard', 'Zürich', 'Genf'), but it does not explain semantics beyond what the schema provides, such as format constraints or case sensitivity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/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 specific verbs ('Get traffic volume') and resources ('ASTRA counting station in Switzerland'), and it distinguishes from sibling tools like 'get_traffic_by_canton' and 'get_traffic_nearby' by specifying retrieval by location name rather than canton or proximity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by providing example locations ('Gotthard', 'Zürich', 'Genf'), but it does not explicitly state when to use this tool versus alternatives like 'get_traffic_by_canton' or 'get_traffic_nearby', nor does it mention any prerequisites or exclusions.

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