Skip to main content
Glama
malkreide
by malkreide

road_traffic_counters

Read-only

Get real-time vehicle counts and average speeds at nearby Swiss traffic measurement stations. Find live traffic flow by location, including car and truck volumes per hour.

Instructions

Get real-time vehicle counts and speeds at Swiss traffic measurement stations.

Finds nearby counting stations and returns live traffic flow data: vehicles per hour (separated by light/heavy vehicles) and average speeds.

Data is updated every minute by ASTRA and cantonal road authorities. This is the «digital tally counter» of Swiss roads – precise, live, distinguishing passenger cars from trucks.

Use case: «How busy is the A1 near Zurich right now?» or «How much truck traffic passes through Lucerne hourly?»

REQUIRES: OPENTRANSPORTDATA_API_KEY environment variable. Free registration: https://api-manager.opentransportdata.swiss

Data source: ASTRA & cantonal authorities via opentransportdata.swiss (DATEX II). Cache TTL: Site table 24h (static) + measurements 1 minute (real-time).

Returns: JSON with nearby counting stations and their current measurements: - site_id: Unique station identifier - name: Station name - distance_km: Distance from search center - latitude / longitude: Station coordinates - supplier: Data provider (ASTRA, Kanton ZH, etc.) - measurement_time: Timestamp of latest measurement - flow_light_vehicles_per_hour: Cars, motorcycles, buses - flow_heavy_vehicles_per_hour: Trucks, articulated lorries - flow_total_per_hour: Combined flow - avg_speed_light_kmh: Average speed of light vehicles - avg_speed_heavy_kmh: Average speed of heavy vehicles

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Annotations already show readOnlyHint=true and non-destructive. The description adds valuable beyond-annotation context: data update every minute, cache TTL (site table 24h, measurements 1 min), and the need for an API key. This clarifies performance and dependency behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured with a clear lead sentence, bullet-like details, and sections for use cases, requirements, and output fields. While slightly lengthy, the information is well-organized and front-loaded, ensuring key points are immediately visible.

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

Completeness5/5

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

Given the tool's complexity and the presence of an output schema, the description covers all necessary aspects: input requirements (latitude, longitude, radius), output fields (site_id, name, flow, speed), data source, update frequency, and API key registration. It is fully sufficient for correct invocation.

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 input schema has well-described parameters with examples (e.g., 'latitude: 47.3769 for Zurich HB'). Since schema coverage is high, the description does not need to repeat them. However, it adds no additional meaning beyond 'finds nearby stations', earning a baseline 3.

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 returns real-time vehicle counts and speeds at Swiss traffic measurement stations. It emphasizes live, per-minute data and distinguishes from sibling tools like road_traffic_situations (incidents) and road_counter_sites (static station info) by focusing on real-time traffic flow.

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

Usage Guidelines4/5

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

The description provides explicit use cases (e.g., 'How busy is the A1 near Zurich right now?') and contextual details like data sources and update frequency. However, it does not explicitly mention when to avoid this tool or suggest alternatives, only implying it's best for real-time traffic queries.

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/malkreide/swiss-road-mobility-mcp'

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