Skip to main content
Glama

validate_od_coordinates_tool

Validate coordinates against a SUMO network to check if they are within the network and find the nearest edge, enabling verification of reachable destinations before proposing them.

Instructions

Validate a list of coordinates against the SUMO network.

Use this BEFORE generating flows to check which coordinates are within the network
and find the nearest edges. Essential for agentic OD planning — lets you verify
destinations are reachable before proposing them to the user.

Args:
    net_file: SUMO network file path (.net.xml)
    coordinates: List of coordinate dicts, each with:
        - lat (float): Latitude (WGS84)
        - lon (float): Longitude (WGS84)
        - label (str, optional): Human-readable label (e.g., "Lincoln Tunnel")
    search_radius: Search radius in km for nearest edge (default: 0.5)

Returns:
    Dict with:
        - network_bbox: [min_lon, min_lat, max_lon, max_lat]
        - results: List of validation results per coordinate:
            - label, lat, lon
            - in_network: bool
            - nearest_edge: edge ID (or null)
            - distance_m: distance to nearest edge in meters (or null)
            - status: "ok" | "out_of_network" | "no_edge_found"

Example:
    validate_od_coordinates_tool(
        net_file="manhattan.net.xml",
        coordinates=[
            {"lat": 40.7505, "lon": -73.9934, "label": "MSG"},
            {"lat": 40.7425, "lon": -74.0099, "label": "Holland Tunnel"},
            {"lat": 40.7060, "lon": -73.9969, "label": "Brooklyn Bridge"}
        ]
    )

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
net_fileYes
coordinatesYes
search_radiusNo
Behavior4/5

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

No annotations provided, but the description details the tool's behavior: it validates coordinates, returns network inclusion status, nearest edge, and distance. It does not disclose side effects, but as a validation tool it is likely read-only. The description is comprehensive.

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 well-structured with clear sections (Args, Returns, Example), front-loaded purpose, and no unnecessary sentences. Every part earns its place.

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 3 parameters, no output schema, and no annotations, the description fully explains input format, output structure, and provides an example. It leaves no gaps for an agent to use the tool correctly.

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

Parameters5/5

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

Schema coverage is 0%, but the description thoroughly documents all parameters: net_file (SUMO network file), coordinates (list of dicts with lat, lon, label), and search_radius (default 0.5 km). It adds significant meaning beyond the schema.

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 it validates coordinates against a SUMO network, checks network inclusion, and finds nearest edges. The verb 'validate' with resource 'coordinates' is specific, and it distinguishes from siblings by stating 'Use this BEFORE generating flows'.

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?

Explicitly says 'Use this BEFORE generating flows' and 'Essential for agentic OD planning', providing clear context. No when-not-to-use or alternatives are mentioned, but the use case is well-defined.

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/urban-ai-institute/kra35-prismx-agentsumo'

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