Skip to main content
Glama

sodural-electrical-mcp

Multi-Voltage Network Graph and Impedance Tracer

sodural_trace_network_topology
Read-onlyIdempotent

Trace multi-voltage electrical network graphs, MV switchboard sections and internal loops (open-point, closed, spur-on-loop, and 3Ic0 galvanic zones), and voltage-referred cumulative impedances (R, X, Z1, Z0 in Ohms) across shortest source-target paths, upstream/downstream trees, BFS depth hierarchy, and k-hop neighborhoods. When to use: Use this tool when evaluating graph connectivity, zero-sequence blocking transformers, and referred path impedances across switching topologies. Do not use for full AC load-flow/Z_bus fault solving, LV feeder sizing, or HV protection reach -- call sodural_solve_topology_whitebox, brain_calc_lv_feeder_physics, or sodural_calc_ansi21_87t_hv instead. Behavior: Stateless, read-only graph traversal (HTTP rate-limited at 120 req/min/IP) defaulting to hops=1, ignoreOpenStatus=false, strictSource=false, lang="fr", and inferred mode; empty nodes or invalid IDs raise JSON-RPC -32602. Returns: mode, nodeCount, edgeCount, openBranchCount, maxDepth, zeroSeqBlockingEdgeIds, and mode-specific path, upstream, downstream, neighborhood, levels, or mvRamesAndLoops.

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": {
      "nodes": "<nodes>",
      "edges": "<edges>"
    },
    "name": "sodural_trace_network_topology"
  }
}

Input Schema

NameRequiredDescriptionDefault
hopsNoGraph hop radius for neighborhood traversal (integer 0..20, defaults to 1).
langNoResponse localization language code for labels ("fr" or "en", defaults to "fr").fr
modeNoGraph tracing mode; automatically inferred from sourceId, targetId, and centerId when omitted.
edgesYesArray of network branches and switches connecting busbar nodes (maximum 10000 edges).
nodesYesNon-empty array of electrical network busbar nodes (maximum 5000 nodes).
centerIdNoCentral busbar node identifier used for k-hop neighborhood and full modes.
sourceIdNoOrigin busbar identifier used by path, downstream, and full tracing modes.
targetIdNoTarget busbar identifier used by path, upstream, and full tracing modes.
strictSourceNoForce preferredSourceId when a closed path exists in upstream mode (defaults to false).
toggleEdgeIdsNoOptional branch identifiers toggled (OPEN <-> CLOSED) before graph tracing.
breakerOverridesNoOptional switching override map { edgeId: "OPEN" | "CLOSED" | boolean } applied before tracing.
ignoreOpenStatusNoAllow envelope fallback traversal across OPEN switching devices (defaults to false).
preferredSourceIdNoPreferred upstream source node identifier prioritized during upstream tracing.

Output Schema

NameRequiredDescriptionDefault
modeNoExecuted or inferred graph traversal mode.
pathNoSummarized electrical path with voltage-referred positive and zero-sequence impedances.
levelsNoBFS hierarchical depth summary rows.
maxDepthNoMaximum BFS topological depth from energized sources.
upstreamNoUpstream source path and ancestor busbar list.
edgeCountNoTotal count of branches evaluated in the network graph.
nodeCountNoTotal count of busbar nodes evaluated in the network graph.
reachableNoTrue when targetId is reachable from sourceId in path mode.
downstreamNoDownstream energized subtree and referred path impedances.
neighborhoodNoK-hop graph neighborhood node and branch identifiers.
mvRamesAndLoopsNoMV switchboard sections, internal loops, and 3Ic0 galvanic zones.
openBranchCountNoNumber of branches in OPEN state after applying overrides.
zeroSeqBlockingEdgeIdsNoTransformer branch IDs that block zero-sequence current.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed28 schema fields changed
    • changedInput schema / additionalProperties
      Previous value: -falseNew value: +true
    • addedInput schema / properties / breakerOverrides / additionalProperties
      Added value: +true
    • changedInput schema / properties / breakerOverrides / description
      Previous value: -"Dictionnaire optionnel { edgeId: \"OPEN\"|\"CLOSED\"|boolean } appliqué avant le traçage."New value: +"Optional switching override map { edgeId: \"OPEN\" | \"CLOSED\" | boolean } applied before tracing."
    • addedInput schema / properties / breakerOverrides / properties
      Added value: +{}
    • changedInput schema / properties / centerId / description
      Previous value: -"Nœud central pour mode neighborhood (ou full)."New value: +"Central busbar node identifier used for k-hop neighborhood and full modes."
    • changedInput schema / properties / edges / description
      Previous value: -"Liste des branches ({ id?, source, target, type?, status?, r?, x?, z_pct?, r_ohm?, x_ohm?, r0?, x0?, length?, vector_group?, sec_kv?, mva? })."New value: +"Array of network branches and switches connecting busbar nodes (maximum 10000 edges)."
    • addedInput schema / properties / edges / items / additionalProperties
      Added value: +true
    • changedInput schema / properties / edges / items / description
      Previous value: -"Descripteur de branche électrique ou organe de coupure entre deux noeuds."New value: +"Branch descriptor { id?, source, target, type?, status?, r?, x?, z_pct?, r_ohm?, x_ohm?, r0?, x0?, length?, vector_group?, sec_kv?, mva? }."
    • addedInput schema / properties / edges / items / properties
      Added value: +{
      +  "source": {
      +    "description": "Origin busbar node identifier.",
      +    "type": "string"
      +  },
      +  "target": {
      +    "description": "Destination node identifier.",
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / hops / default
      Added value: +1
    • changedInput schema / properties / hops / description
      Previous value: -"Nombre de sauts pour mode neighborhood (défaut: 1)."New value: +"Graph hop radius for neighborhood traversal (integer 0..20, defaults to 1)."
    • addedInput schema / properties / ignoreOpenStatus / default
      Added value: +false
    • changedInput schema / properties / ignoreOpenStatus / description
      Previous value: -"Autorise le repli enveloppe à travers les organes OPEN (défaut: false)."New value: +"Allow envelope fallback traversal across OPEN switching devices (defaults to false)."
    • addedInput schema / properties / lang / default
      Added value: +"fr"
    • changedInput schema / properties / lang / description
      Previous value: -"Langue des paliers de tension (fr|en, défaut: fr)."New value: +"Response localization language code for labels (\"fr\" or \"en\", defaults to \"fr\")."
    • changedInput schema / properties / mode / description
      Previous value: -"Mode de traçage (déduit automatiquement de sourceId/targetId/centerId si omis)."New value: +"Graph tracing mode; automatically inferred from sourceId, targetId, and centerId when omitted."
    • changedInput schema / properties / nodes / description
      Previous value: -"Liste des nœuds/jeux de barres ({ id, nom_kv, base_kv?, bus_type?, is_source?, label?, subsystem_index? })."New value: +"Non-empty array of electrical network busbar nodes (maximum 5000 nodes)."
    • addedInput schema / properties / nodes / items / additionalProperties
      Added value: +true
    • changedInput schema / properties / nodes / items / description
      Previous value: -"Descripteur de noeud ou jeu de barres du graphe topologique."New value: +"Node descriptor { id, nom_kv, base_kv?, bus_type?, is_source?, label?, subsystem_index? }."
    • addedInput schema / properties / nodes / items / properties
      Added value: +{
      +  "id": {
      +    "description": "Unique busbar node identifier.",
      +    "type": "string"
      +  },
      +  "nom_kv": {
      +    "description": "Nominal line-to-line voltage in kV.",
      +    "type": "number"
      +  }
      +}
    • changedInput schema / properties / preferredSourceId / description
      Previous value: -"Source amont préférentielle pour mode upstream."New value: +"Preferred upstream source node identifier prioritized during upstream tracing."
    • changedInput schema / properties / sourceId / description
      Previous value: -"Identifiant du nœud source/origine pour modes path, downstream ou full."New value: +"Origin busbar identifier used by path, downstream, and full tracing modes."
    • addedInput schema / properties / strictSource / default
      Added value: +false
    • changedInput schema / properties / strictSource / description
      Previous value: -"Force la source préférentielle si un chemin fermé existe en mode upstream (défaut: false)."New value: +"Force preferredSourceId when a closed path exists in upstream mode (defaults to false)."
    • changedInput schema / properties / targetId / description
      Previous value: -"Identifiant du nœud cible pour modes path, upstream ou full."New value: +"Target busbar identifier used by path, upstream, and full tracing modes."
    • changedInput schema / properties / toggleEdgeIds / description
      Previous value: -"Liste optionnelle d’ID de branches à basculer (OPEN <-> CLOSED) avant le traçage."New value: +"Optional branch identifiers toggled (OPEN <-> CLOSED) before graph tracing."
    • changedInput schema / properties / toggleEdgeIds / items / description
      Previous value: -"Identifiant unique de branche dont l etat OPEN/CLOSED doit basculer."New value: +"Unique branch identifier whose OPEN/CLOSED state is toggled."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "Topological graph paths, voltage-referred impedances, BFS levels, and MV loop diagnostics.",
      +  "properties": {
      +    "downstream": {
      +      "additionalProperties": true,
      +      "description": "Downstream energized subtree and referred path impedances.",
      +      "properties": {
      +        "downstreamCount": {
      +          "description": "Count of energized downstream buses.",
      +          "type": "integer"
      +        },
      +        "rootId": {
      +          "description": "Origin busbar identifier.",
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "edgeCount": {
      +      "description": "Total count of branches evaluated in the network graph.",
      +      "type": "integer"
      +    },
      +    "levels": {
      +      "description": "BFS hierarchical depth summary rows.",
      +      "items": {
      +        "additionalProperties": true,
      +        "description": "Busbar BFS hierarchy row.",
      +        "properties": {
      +          "depth": {
      +            "description": "BFS hierarchical depth level.",
      +            "type": "integer"
      +          },
      +          "id": {
      +            "description": "Busbar node identifier string.",
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "maxDepth": {
      +      "description": "Maximum BFS topological depth from energized sources.",
      +      "type": "integer"
      +    },
      +    "mode": {
      +      "description": "Executed or inferred graph traversal mode.",
      +      "type": "string"
      +    },
      +    "mvRamesAndLoops": {
      +      "additionalProperties": true,
      +      "description": "MV switchboard sections, internal loops, and 3Ic0 galvanic zones.",
      +      "properties": {
      +        "couplingMode": {
      +          "description": "MV switchboard coupling state.",
      +          "type": "string"
      +        },
      +        "rames": {
      +          "description": "Detected MV bus sections and galvanic zones.",
      +          "items": {
      +            "additionalProperties": true,
      +            "description": "MV busbar section descriptor.",
      +            "properties": {
      +              "nomKv": {
      +                "description": "Nominal MV voltage in kV.",
      +                "type": "number"
      +              },
      +              "rameId": {
      +                "description": "MV busbar section identifier.",
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "neighborhood": {
      +      "additionalProperties": true,
      +      "description": "K-hop graph neighborhood node and branch identifiers.",
      +      "properties": {
      +        "centerId": {
      +          "description": "Center busbar node identifier.",
      +          "type": "string"
      +        },
      +        "hops": {
      +          "description": "Applied graph hop radius.",
      +          "type": "integer"
      +        },
      +        "nodeIds": {
      +          "description": "Nodes located within k hops.",
      +          "items": {
      +            "description": "Neighbor busbar node identifier.",
      +            "type": "string"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "nodeCount": {
      +      "description": "Total count of busbar nodes evaluated in the network graph.",
      +      "type": "integer"
      +    },
      +    "openBranchCount": {
      +      "description": "Number of branches in OPEN state after applying overrides.",
      +      "type": "integer"
      +    },
      +    "path": {
      +      "additionalProperties": true,
      +      "description": "Summarized electrical path with voltage-referred positive and zero-sequence impedances.",
      +      "properties": {
      +        "pathNodes": {
      +          "description": "Ordered sequence of traversed busbar IDs.",
      +          "items": {
      +            "description": "Ordered busbar identifier along the path.",
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "referredBaseKv": {
      +          "description": "Target reference voltage level in kV to which impedances are referred.",
      +          "type": "number"
      +        },
      +        "sourceId": {
      +          "description": "Origin busbar node identifier for the traced electrical path.",
      +          "type": "string"
      +        },
      +        "stepsCount": {
      +          "description": "Number of electrical branches traversed along the path.",
      +          "type": "integer"
      +        },
      +        "targetId": {
      +          "description": "Destination busbar node identifier for the traced electrical path.",
      +          "type": "string"
      +        },
      +        "totalRReferredOhm": {
      +          "description": "Cumulative positive-sequence resistance referred to target kV in Ohms.",
      +          "type": "number"
      +        },
      +        "totalXReferredOhm": {
      +          "description": "Cumulative positive-sequence reactance referred to target kV in Ohms.",
      +          "type": "number"
      +        },
      +        "totalZ0ReferredOhm": {
      +          "description": "Cumulative zero-sequence impedance magnitude referred in Ohms.",
      +          "type": "number"
      +        },
      +        "totalZReferredOhm": {
      +          "description": "Cumulative positive-sequence impedance magnitude referred in Ohms.",
      +          "type": "number"
      +        },
      +        "zeroSeqBlocked": {
      +          "description": "True if a transformer winding along the path blocks zero-sequence current.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "reachable": {
      +      "description": "True when targetId is reachable from sourceId in path mode.",
      +      "type": "boolean"
      +    },
      +    "upstream": {
      +      "additionalProperties": true,
      +      "description": "Upstream source path and ancestor busbar list.",
      +      "properties": {
      +        "ancestorNodeIds": {
      +          "description": "Ordered upstream ancestor busbar identifiers.",
      +          "items": {
      +            "description": "Upstream ancestor busbar ID.",
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "bestSourcePath": {
      +          "additionalProperties": true,
      +          "description": "Summarized electrical path with voltage-referred positive and zero-sequence impedances.",
      +          "properties": {
      +            "pathNodes": {
      +              "description": "Ordered sequence of traversed busbar IDs.",
      +              "items": {
      +                "description": "Ordered busbar identifier along the path.",
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "referredBaseKv": {
      +              "description": "Target reference voltage level in kV to which impedances are referred.",
      +              "type": "number"
      +            },
      +            "sourceId": {
      +              "description": "Origin busbar node identifier for the traced electrical path.",
      +              "type": "string"
      +            },
      +            "stepsCount": {
      +              "description": "Number of electrical branches traversed along the path.",
      +              "type": "integer"
      +            },
      +            "targetId": {
      +              "description": "Destination busbar node identifier for the traced electrical path.",
      +              "type": "string"
      +            },
      +            "totalRReferredOhm": {
      +              "description": "Cumulative positive-sequence resistance referred to target kV in Ohms.",
      +              "type": "number"
      +            },
      +            "totalXReferredOhm": {
      +              "description": "Cumulative positive-sequence reactance referred to target kV in Ohms.",
      +              "type": "number"
      +            },
      +            "totalZ0ReferredOhm": {
      +              "description": "Cumulative zero-sequence impedance magnitude referred in Ohms.",
      +              "type": "number"
      +            },
      +            "totalZReferredOhm": {
      +              "description": "Cumulative positive-sequence impedance magnitude referred in Ohms.",
      +              "type": "number"
      +            },
      +            "zeroSeqBlocked": {
      +              "description": "True if a transformer winding along the path blocks zero-sequence current.",
      +              "type": "boolean"
      +            }
      +          },
      +          "type": "object"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "zeroSeqBlockingEdgeIds": {
      +      "description": "Transformer branch IDs that block zero-sequence current.",
      +      "items": {
      +        "description": "Branch ID blocking zero-sequence continuity.",
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / edges / items / description
      Added value: +"Descripteur de branche électrique ou organe de coupure entre deux noeuds."
    • addedInput schema / properties / nodes / items / description
      Added value: +"Descripteur de noeud ou jeu de barres du graphe topologique."
    • addedInput schema / properties / toggleEdgeIds / items / description
      Added value: +"Identifiant unique de branche dont l etat OPEN/CLOSED doit basculer."
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive and closed-world, and the description still adds substantive context beyond them: statelessness, an HTTP rate limit of 120 req/min/IP, the defaulted flags (hops=1, ignoreOpenStatus=false, strictSource=false, lang=fr) and mode inference. It also discloses failure behavior (-32602 on empty nodes or invalid IDs), which is the kind of error contract agents need before calling.

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?

Front-loaded with the action, then clearly sectioned into 'When to use', 'Do not use', 'Behavior' and 'Returns'. The first sentence is dense with domain jargon and zone types, but almost every clause carries information; little is wasted given the tool's breadth.

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?

For a 13-parameter, nested-schema tool with mode-dependent outputs, the definition covers purpose, exclusions, defaults, rate limit, error codes and output shape. Because an output schema exists, the brief 'Returns' list is sufficient rather than a gap; nothing an agent needs in order to call correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents every parameter including defaults and enum values. The description mostly restates those defaults and the mode-inference rule rather than adding new meaning (e.g. it does not explain how breakerOverrides interacts with toggleEdgeIds or what 'spur-on-loop' zones imply for strictSource). Baseline 3 is appropriate.

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?

Opening sentence gives a specific verb ('Trace') plus the exact resources: multi-voltage network graphs, MV switchboard sections, internal loops (open-point, closed, spur-on-loop, 3Ic0 zones) and voltage-referred impedances (R, X, Z1, Z0). It also enumerates the traversal shapes (shortest path, upstream/downstream trees, BFS depth, k-hop), which lets an agent distinguish this from generic solvers without opening the schema.

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?

Explicit 'When to use' condition (graph connectivity, zero-sequence blocking transformers, referred path impedances across switching topologies) and an explicit 'Do not use for' clause naming the three excluded domains with the exact sibling to call instead in each case.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources