Skip to main content
Glama

reduce_lanes_tool

Reduce lanes on road segments using relative or absolute reduction modes. Specify target road and radius for localized lane reduction, then reuse existing trip files for simulation.

Instructions

Reduce lanes on road segments with two modes.

✅ Trip file can be reused - edges still exist, only lane count changed.
Workflow: reduce_lanes → sumo_runner (reuse existing trip file)

**MODE 1: Relative Reduction (RECOMMENDED for most policies)**
- reduce_by: Reduce N lanes from each segment
- Example: reduce_by=1 → 5→4, 3→2, 2→1, 1→1 (balanced reduction)

**MODE 2: Absolute Reduction (for special cases)**
- remain_lanes: Set all segments to N lanes
- Example: remain_lanes=1 → 5→1, 3→1, 2→1, 1→1 (extreme reduction)

REALISTIC USAGE: Use reference_location + radius_km for localized lane reduction!

Examples:
    # BALANCED POLICY: Reduce 1 lane from each segment
    reduce_lanes_tool(
        net_file="gangnam_station.net.xml",
        target_road_name="테헤란로",
        reference_location="강남역",
        radius_km=0.5,
        reduce_by=1  # Each segment: 5→4, 3→2, 2→1, 1→1
    )
    # Then: sumo_runner (reuse trip file - no trip_generate needed!)

    # EXTREME POLICY: Set all segments to 1 lane
    reduce_lanes_tool(
        net_file="gangnam_station.net.xml",
        target_road_name="테헤란로",
        reference_location="강남역",
        radius_km=0.5,
        remain_lanes=1  # All segments: 5→1, 3→1, 2→1, 1→1
    )
    # Then: sumo_runner (reuse trip file - no trip_generate needed!)

Args:
    net_file: Network file path
    route_file: Route file path (optional, can be reused after this tool)
    output_dir: Output directory for results
    target_road_name: Road name to reduce lanes (e.g., '테헤란로')
    edge_ids: Specific edge IDs (optional)
    reference_location: Reference point (optional, e.g., "강남역")
    radius_km: Radius in km (optional, e.g., 0.5)
    reduce_by: Number of lanes to reduce from each segment (RECOMMENDED!)
    remain_lanes: Number of lanes to remain (ABSOLUTE - use with caution)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
edge_idsNo
net_fileYes
radius_kmNo
reduce_byNo
output_dirNooutput/networks
route_fileNo
remain_lanesNo
target_road_nameNo
reference_locationNo
Behavior4/5

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

With no annotations, the description carries full burden. It explains that edges still exist and only lane count changes, that trip files can be reused, and provides examples of reduction behavior. However, it does not disclose what happens if reduce_by exceeds existing lanes, whether the operation is reversible, or any resource/permission requirements.

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, bullet points, and examples, making it easy to scan. It is detailed but not excessively verbose. The examples are particularly helpful. However, the length could be slightly reduced by merging some duplicate points (e.g., the workflow note appears twice).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers usage and modes well but lacks information about the output (e.g., what files are produced, return value). With no output schema, the agent may not know what to expect after invocation. Error handling or edge cases (e.g., invalid road name, insufficient lanes) are also not addressed.

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?

Despite 0% schema coverage, the description adds significant meaning: it explains reduce_by and remain_lanes with examples, gives default for output_dir, and clarifies optional parameters like route_file (can be reused). However, some parameters like edge_ids and route_file receive minimal explanation beyond the args list.

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: 'Reduce lanes on road segments' and distinguishes between two modes (relative and absolute). It is specific about the resource (road segments) and verb (reduce lanes), and the context of sibling tools (e.g., edge_edit_tool, speed_limit_edit_tool) implies this is unique for lane reduction.

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 provides explicit usage context: it recommends Mode 1 over Mode 2, suggests using reference_location and radius_km for localized reduction, and gives a workflow hint (reduce_lanes → sumo_runner with reusable trip file). However, it does not explicitly state when NOT to use this tool (e.g., if lanes cannot be reduced below 1) or provide alternatives beyond the workflow suggestion.

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