Skip to main content
Glama

visualize_edgedata_tool

Generate heatmaps from SUMO edge data to analyze traffic attributes across multiple simulations using auto, unified, or fixed scales.

Instructions

🎨 Visualize SUMO edgedata with flexible scaling modes for comparison.

⚠️ IMPORTANT: Only use when user EXPLICITLY requests heatmap/visualization!
- User says "show heatmap", "visualize density", "show congestion map" → Use this
- User asks "which road is congested?" -> Do NOT use; answer with text from SQL query

**SCALE MODES:**

1. **'auto'** (default): Dynamic scale from current file
   - Best for: Single simulation analysis
   - Scale: Optimized for current data range

2. **'unified'**: Consistent scale across multiple files
   - Best for: Policy comparison (before/after)
   - Requires: comparison_files parameter
   - Example: Compare baseline vs policy A vs policy B

3. **'fixed'**: User-defined fixed scale
   - Best for: Standardized reports, academic papers
   - Requires: min_value and max_value parameters
   - Example: Always use [0, 100] for all simulations

**USE CASES:**

# Single simulation analysis (auto scale)
visualize_edgedata_tool(..., scale_mode="auto")
→ Optimized color contrast for this simulation

# Policy comparison (unified scale)
visualize_edgedata_tool(
    edgedata_file="after.xml",
    scale_mode="unified",
    comparison_files=["before.xml"]
)
→ Same colors mean same values across both

# Standardized scale (fixed)
visualize_edgedata_tool(..., scale_mode="fixed", min_value=0, max_value=100)
→ All simulations use [0, 100] scale

Args:
    net_file: Path to the SUMO network file (.net.xml)
    edgedata_file: Path to the SUMO edgeData output file (.xml)
    attribute: Attribute to visualize (e.g., 'density', 'speed', 'CO2_abs')
    output_dir: Output directory for visualization files
    scale_mode: Scale mode ('auto' | 'unified' | 'fixed')
    comparison_files: List of files for unified scale (for 'unified' mode)
    min_value: Minimum value for fixed scale (for 'fixed' mode)
    max_value: Maximum value for fixed scale (for 'fixed' mode)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
net_fileYes
attributeNodensity
max_valueNo
min_valueNo
output_dirNooutput/visualizations
scale_modeNoauto
edgedata_fileYes
comparison_filesNo
Behavior4/5

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

No annotations provided, so description carries full burden. It explains scale modes and parameters clearly, but does not explicitly state whether the tool is read-only or any side effects. However, as a visualization tool, this is reasonable.

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?

Well-structured with sections, but slightly verbose due to repeated examples. Front-loaded with purpose and warnings. Every part is justified.

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?

With 8 parameters, no output schema, and no annotations, the description provides comprehensive coverage: all parameters explained, use cases, scale modes, and examples. It fully compensates for the lack of structured metadata.

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's 'Args' section explains all 8 parameters with context, default values, and examples. This adds significant meaning beyond the schema's bare types.

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 visualizes SUMO edgedata with flexible scaling modes. It distinguishes from siblings like visualize_net_tool by explicitly focusing on edgedata and visualization.

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?

Provides explicit when-to-use (user requests heatmap/visualization) and when-not-to-use (answer textually to 'which road is congested?'), with alternative approaches. Also includes use cases for each scale mode.

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