get_road_names_tool
Convert SUMO edge IDs to real-world road names to make traffic analysis results human-readable and actionable.
Instructions
Convert SUMO edge IDs to actual road names using edge.getName().
IMPORTANT: Use this after congestion analysis to show human-readable road names!
This tool maps SUMO's technical edge IDs to real-world street names,
making analysis results much more understandable and actionable.
Args:
edge_ids: List of SUMO edge IDs to convert (e.g., ["194926855#1", "420901920#0"])
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:
Dict mapping edge_id → road_name
Example workflow:
1. SQL query for Top 10 density:
read_query("SELECT edge_id, avg_density FROM edge_metrics ORDER BY avg_density DESC LIMIT 10")
→ ["194926855#1", "1030139836#1", ...]
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 to road names:
get_road_names_tool(
edge_ids=["194926855#1", "1030139836#1", ...],
net_file="/path/to/network.net.xml" # Use actual path from step 2 or user-provided
)
→ {"194926855#1": "9th Avenue", "1030139836#1": "Broadway", ...}
4. Present results:
"Top 10 Congested Roads:
1. 9th Avenue: 800 veh/km
2. Broadway: 731 veh/km
..."
Note:
- Returns "Unnamed Road" if road name not set in network
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"edge_ids": "<edge_ids>",
"net_file": "<net_file>"
},
"name": "get_road_names_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edge_ids | Yes | ||
| net_file | Yes |