Skip to main content
Glama

edge_edit_tool

Delete road segments from a SUMO network file. Specify a road name and optionally a location with radius to close a partial section. Requires subsequent trip and route regeneration.

Instructions

Delete specific road segments from the network file.

⚠️🚨 CRITICAL: After using this tool, you MUST regenerate trips and routes!
Route files contain explicit edge lists - if those edges are deleted, the route file becomes INVALID!
Workflow: edge_edit → trip_generate → route_generate → sumo_runner (REQUIRED!)

🌟 REALISTIC USAGE: Specify reference_location + radius_km for partial road closure!

Three modes (priority order):
1. edge_ids: Delete exact edges (most precise, but requires knowing edge IDs)
2. target_road_name + reference_location + radius_km: Delete road segments near a location (REALISTIC!)
3. target_road_name only: Delete entire road (extreme scenario, use with caution!)

Examples:
    # REALISTIC: Block 300m of Teheran-ro near Gangnam Station (construction scenario)
    edge_edit_tool(
        net_file="gangnam_station.net.xml",
        target_road_name="테헤란로",
        reference_location="강남역",
        radius_km=0.3
    )
    # Then: trip_generate → sumo_runner (MUST regenerate trip!)

    # EXTREME: Block entire Teheran-ro (unrealistic!)
    edge_edit_tool(
        net_file="gangnam_station.net.xml",
        target_road_name="테헤란로"
    )
    # Then: trip_generate → sumo_runner (MUST regenerate trip!)

Args:
    net_file: Network file path
    route_file: Route file path (optional, but will be invalidated after edge deletion)
    output_dir: Output directory for results
    target_road_name: Road name to delete from network (e.g., '테헤란로')
    edge_ids: Specific edge IDs to delete (list, optional)
    reference_location: Reference point for partial deletion (str, optional, e.g., "강남역")
    radius_km: Radius in km around reference (float, optional, e.g., 0.3)

Returns:
    Dict with status, net_file, and requires_reroute=True (indicating trip regeneration needed)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
edge_idsNo
net_fileYes
radius_kmNo
output_dirNooutput/networks
route_fileNo
target_road_nameNo
reference_locationNo
Behavior5/5

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

No annotations provided, but the description fully compensates by disclosing critical behavior: deletion invalidates route files, requires rerun of trip_generate, and returns requires_reroute=True. Includes clear warnings and workflow requirements.

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?

Well-organized with bold warnings, sections for modes, bulleted examples, and parameter list. Every sentence adds value without redundancy. Critical information is front-loaded.

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?

Despite 7 parameters and no output schema, the description covers all necessary context: modes, prerequisites, workflow, example outputs, and return value indicating required rerun. Completely sufficient for correct tool 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 has 0% description coverage. The description explains all 7 parameters, including defaults, optionality, and usage in different modes. Examples illustrate parameter combinations for realistic and extreme scenarios.

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 states 'Delete specific road segments from the network file' with three distinct modes (edge_ids, target_road_name+location+radius, target_road_name only), clearly distinguishing use cases. It includes realistic examples and contrasts with extreme scenarios.

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

Usage Guidelines5/5

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

Explicitly provides when to use each mode (priority order) and realistic vs extreme use. Warns that after deletion, trips and routes must be regenerated, and specifies the workflow: edge_edit → trip_generate → route_generate → sumo_runner.

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