Skip to main content
Glama

get_edge_ids_from_road_name_tool

Convert a human-readable road name to SUMO edge IDs using a network file, enabling SQL queries on traffic metrics by road name.

Instructions

Convert road name to SUMO edge IDs using edge.getName().

IMPORTANT: Use this when user asks questions with road names (e.g., "What is the density of Teheran-ro?")

This tool maps human-readable road names to SUMO's technical edge IDs,
enabling SQL queries based on road names.

Args:
    road_name: Road name (e.g., "테헤란로", "강남대로", "9th Avenue")
    net_file: Network file path used in simulation.
              When working with DB data, get this from:
              SELECT net_file FROM simulations WHERE simulation_id = '<your_sim_id>'

Returns:
    List[str]: List of edge IDs matching the road name

Example workflow:
    1. User asks: "What is the density of Teheran-ro?"

    2. Get net_file from DB (if using DB data):
       read_query("SELECT net_file FROM simulations WHERE simulation_id = 'baseline'")
       → "/path/to/network.net.xml"

    3. Convert road name to edge IDs:
       get_edge_ids_from_road_name_tool(
           road_name="테헤란로",
           net_file="/path/to/network.net.xml"  # Use actual path from step 2
       )
       → ["375049565#11", "375049565#12", "375049565#13", ...]

    4. Use in SQL query:
       read_query("SELECT AVG(density) FROM edge_metrics WHERE edge_id IN ('375049565#11', '375049565#12', ...)")

    5. Present results with road name (not edge IDs)

Note:
    - Returns all edge segments for the given road name
    - Raises ValueError if road name not found

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
net_fileYes
road_nameYes
Behavior4/5

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

With no annotations, the description carries full burden. It discloses that the tool returns all edge segments for a road name, raises ValueError if not found, and returns a list of strings. It does not mention side effects or authentication, but for a read-only mapping tool, this is sufficient. The description is transparent about core behaviors.

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 well-structured with sections (title, important note, args, returns, example workflow, note). The example workflow is detailed but useful. It could be slightly more concise, but every part serves a purpose.

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 2 parameters, no output schema, and no annotations, the description is thorough: explains both parameters, return type, error handling, and provides a full workflow showing integration with other tools (DB queries, read_query). It gives the agent all necessary context for correct invocation.

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%, so the description fully compensates. For 'road_name', it provides examples like '테헤란로' and states it's a road name. For 'net_file', it explains the network file path and gives a specific SQL query to retrieve it from the DB. This adds significant meaning beyond the bare 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 the tool's purpose: 'Convert road name to SUMO edge IDs using edge.getName().' It explains the mapping from human-readable road names to technical edge IDs, and distinguishes itself from sibling tools like get_road_names_tool by focusing on conversion rather than listing names.

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 explicitly says 'Use this when user asks questions with road names' and provides a complete example workflow showing exactly how and when to use the tool. It lacks an explicit statement of when not to use it or mention of alternatives, but the guidance is strong.

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