Skip to main content
Glama

check_traffic_controls

Read-onlyIdempotent

Check OpenStreetMap for traffic signals and stop signs at a junction, within an area, or along a route corridor; returns control type, counts, coordinates, and a verification map.

Instructions

Check OpenStreetMap for traffic signals (traffic lights) and stop signs at a junction, within a radius of a coordinate/place, across a bounding box/area, or along a route corridor. Returns explicit booleans (has_traffic_signal, has_stop_sign), junction classification (control_type: 'traffic_signals' | 'stop_sign' | 'both' | 'none'), separate counts, exact coordinates, and a shareable verification map.

MODES:

  • Junction / Coordinate: pass a point in 'bbox' (e.g. '40.7580,-73.9855') with optional 'radius_meters' (defaults to 35m).

  • Bounding box / Area: pass a bbox or 'location' (without 'radius_meters') to count or list all traffic signals and stop signs inside.

  • Route corridor (by endpoints): pass 'origin' and 'destination' (plus optional 'profile': driving/walking/cycling) to route via OSRM and inspect traffic controls along the route in one call.

  • Route corridor (by geometry): pass 'route_geometry' (the GeoJSON LineString from calculate_route) with optional 'radius_meters' (defaults to 20m) to evaluate traffic signals and stop signs along a route in travel order.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "check_traffic_controls"
  }
}

Input Schema

NameRequiredDescriptionDefault
bboxNoPoint 'lat,lng', bounding box 'lat1,lng1,lat2,lng2', WKT, GeoJSON, tile 'z/x/y', or ogrinfo extent. For a single point, 'radius_meters' defaults to 35m if omitted.
limitNoMaximum total elements to return across traffic_signals and stop_signs when count_only is false. Default is 200 (max 1000).
offsetNoPagination offset when count_only is false. Default is 0.
originNoRoute origin ('lat,lng' or place name) when evaluating traffic controls directly between two points. Must be paired with 'destination'.
profileNoRouting profile when using 'origin' and 'destination': 'driving' (default), 'walking', or 'cycling'.
locationNoA text location or intersection to check (e.g. 'Manhattan', '5th Ave and 42nd St, New York'). Provide 'location', 'bbox', 'route_geometry', or 'origin'+'destination'.
count_onlyNoIf true, returns presence booleans and counts without individual feature coordinates. Defaults to false.
destinationNoRoute destination ('lat,lng' or place name) when evaluating traffic controls directly between two points. Must be paired with 'origin'.
radius_metersNoSearch radius in meters. Enables circle mode around a point/location (defaults to 35m for a single point) or corridor width around a route (defaults to 20m).
route_geometryNoGeoJSON LineString ({ type: 'LineString', coordinates: [[lng, lat], ...] }) from calculate_route to find traffic signals and stop signs along a route corridor.
timeout_secondsNoOverpass server query timeout in seconds. Default is 25.
include_crossingsNoIf true, also treats signalized pedestrian crossings (highway=crossing with crossing=traffic_signals or crossing:signals=yes) as traffic signals. Defaults to false.
use_area_boundaryNoIf true (default), uses exact OSM administrative boundary polygon for named locations when available.

Output Schema

NameRequiredDescriptionDefault
limitNo
countsYes
offsetNo
completeYes
has_moreNo
warningsYes
share_urlYes
truncatedNo
count_onlyYes
provenanceYes
stop_signsNo
next_offsetNo
osm_area_idNo
search_modeYes
alternativesNo
control_typeYes
distance_fromNo
has_stop_signYes
matched_placeNo
route_summaryNo
returned_countsNo
traffic_signalsNo
has_traffic_signalYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.7.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint and destructiveHint=false, and the description adds substantial context on top: the data source (OSM/Overpass), default radii that differ by mode (35m point vs 20m corridor), what count_only suppresses, how include_crossings changes signal detection, Overpass timeout exposure, and use_area_boundary behavior. It also describes the verification map return, which no annotation conveys.

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?

Purpose and return values are front-loaded, and the MODES bullets are an efficient structure for a 13-parameter tool rather than padding. The return-value sentence is dense but each item earns its place by telling the agent what it can rely on. Slight verbosity in restating defaults already present in the schema.

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?

For a 13-parameter tool with nested GeoJSON input, the definition covers mode selection, defaults, output semantics, and upstream dependency (calculate_route) adequately; an output schema exists so return values need not be further explained. Combined with rich annotations, an agent has everything needed to invoke it correctly in any of the four modes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, but the description adds cross-parameter meaning the schema does not: radius_meters has different defaults depending on whether bbox is a point or a route, and count_only versus limit/offset interact when listing features. It also clarifies which parameters are mutually exclusive by mode. Minor gaps remain around precedence when multiple location inputs are supplied simultaneously.

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 opens with a specific verb and resource ('Check OpenStreetMap for traffic signals and stop signs') and immediately scopes where it looks (junction, radius, bbox, route corridor). It also enumerates the exact return shape (has_traffic_signal, has_stop_sign, control_type classification, counts, coordinates, verification map), which lets an agent distinguish this from siblings like search_overpass or calculate_route without opening any schema.

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 MODES block gives explicit parameter combinations for four distinct usage patterns, including the subtle distinction of passing 'location'/bbox without radius_meters to get area mode versus with radius_meters for circle mode. It also names calculate_route as the source of 'route_geometry', routing the agent correctly. It stops short of stating when not to use the tool or naming a competing alternative for control data, so it is strong context but not a full when/when-not guide.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.