Skip to main content
Glama

visum_network_stats

Retrieve comprehensive network statistics from a loaded Visum project to analyze transportation infrastructure and performance metrics.

Instructions

Get comprehensive network statistics from the loaded Visum project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool registration for 'visum_network_stats'. Defines empty schema and thin handler that delegates to PersistentVisumController.getNetworkStats() and formats the markdown response.
    server.tool(
      "visum_network_stats",
      "Get comprehensive network statistics from the loaded Visum project",
      {},
      async () => {
        try {
          const result = await visumController.getNetworkStats();
          
          if (result.success) {
            return {
              content: [
                {
                  type: "text",
                  text: `✅ **Statistiche Rete PERSISTENTE**\n\n` +
                        `**Riepilogo Rete:**\n` +
                        `• **Nodi:** ${result.result?.nodes?.toLocaleString() || 'N/A'}\n` +
                        `• **Link:** ${result.result?.links?.toLocaleString() || 'N/A'}\n` +
                        `• **Zone:** ${result.result?.zones?.toLocaleString() || 'N/A'}\n\n` +
                        `**Performance ULTRA-VELOCE:**\n` +
                        `• **Tempo Query:** ${result.result?.query_time_ms?.toFixed(3) || 'N/A'}ms\n` +
                        `• **Tempo Totale:** ${result.executionTimeMs?.toFixed(3) || 'N/A'}ms\n` +
                        `• **Persistente:** ${result.result?.persistent ? '✅ SÌ' : '❌ NO'}\n\n` +
                        `*Dati recuperati da istanza VisumPy PERSISTENTE - Ultra-veloce!*`
                }
              ]
            };
          } else {
            return {
              content: [
                {
                  type: "text",
                  text: `❌ **Impossibile ottenere statistiche rete**\n\n` +
                        `Il progetto Visum potrebbe non essere caricato o accessibile.\n` +
                        `La prima chiamata potrebbe richiedere più tempo per inizializzare l'istanza VisumPy.`
                }
              ]
            };
          }
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `❌ **Errore ottenimento statistiche rete:**\n\n${error instanceof Error ? error.message : String(error)}`
              }
            ]
          };
        }
      }
    );
  • Core handler method in PersistentVisumController that sends optimized Python code to the persistent VisumPy process to query network counts (nodes, links, zones) and measures execution time.
      public async getNetworkStats(): Promise<VisumResponse> {
        const code = `
    # Ultra-fast network statistics from persistent instance
    start_time = time.time()
    nodes = visum.Net.Nodes.Count
    links = visum.Net.Links.Count
    zones = visum.Net.Zones.Count
    elapsed = time.time() - start_time
    
    result = {
        'nodes': nodes,
        'links': links, 
        'zones': zones,
        'query_time_ms': round(elapsed * 1000, 3),
        'persistent': True
    }
    `;
        return this.sendCommandToPersistentProcess(code, "Network statistics (persistent)");
      }
  • Empty input schema (no parameters required).
    {},
  • Test simulation of the tool call, demonstrating the network stats Python code execution.
        # TOOL 1: visum_network_stats
        result1 = simulate_mcp_tool_call(
            "visum_network_stats",
            """
    # Basic network statistics
    nodes = visum.Net.Nodes.Count
    links = visum.Net.Links.Count
    zones = visum.Net.Zones.Count
    
    result['network_stats'] = {
        'nodes': nodes,
        'links': links,
        'zones': zones,
        'timestamp': time.time()
    }
    
    print(f"Network stats: {nodes:,} nodes, {links:,} links, {zones:,} zones")
    """,
            "Get basic network statistics"
        )
        all_results.append(result1)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but lacks details on traits like whether it's read-only, requires specific permissions, has rate limits, or what the output format might be. This is a significant gap for a tool that likely returns data, making it inadequate for informed use.

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?

The description is a single, efficient sentence that front-loads the key action and resource. It wastes no words and is appropriately sized for the tool's simplicity, earning full marks for conciseness.

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

Completeness2/5

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

Given the complexity (a data-fetching tool with no annotations and no output schema), the description is incomplete. It doesn't explain what 'comprehensive network statistics' entails, the return format, or any behavioral constraints. This leaves the agent with insufficient information to use the tool effectively in context.

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?

The tool has 0 parameters, and the input schema has 100% description coverage (though empty). The description doesn't need to add parameter details, so it meets the baseline for a parameterless tool. No additional semantics are required, but it doesn't compensate for any gaps since there are none.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('comprehensive network statistics from the loaded Visum project'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'visum_network_analysis' or 'visum_health_check', which might also involve network-related operations, so it doesn't reach the highest score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., a loaded project), exclusions, or compare it to siblings like 'visum_network_analysis', leaving the agent with minimal context for selection.

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/multiluca2020/visum-thinker-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server