Skip to main content
Glama

sodural-electrical-mcp

White-Box Multi-Bus Z_bus and Load-Flow Solver

sodural_solve_topology_whitebox
Read-onlyIdempotent

Solve symmetrical-component Z_bus short-circuit currents (Z1/Z2/Z0, peak factor kappa methods A/B/C, Ik"3, Ik"1, ip, and Ith) and full Newton-Raphson AC power flow with 2W/3W OLTC regulation, MV switchboard sections, and internal MV loops on tabular JSON or an algebraic sandbox. When to use: Use this tool when evaluating coupled multi-bus fault currents, nodal impedances, and voltage profiles in kA, Ohms, MW, and MVAr. Do not use for graph-only path tracing, single-breaker Ith duty, or relay curve coordination -- call sodural_trace_network_topology, sodural_calc_thermal_equivalent, or sodural_calc_selectivity_tcc instead. Behavior: Stateless, read-only, deterministic solver (HTTP rate-limited at 120 req/min/IP) defaulting to mode="auto", kappaMethod="C", applyKT=true, runShortCircuit=true, runLoadFlow=true, enableOltc=true, sBaseMva=100, and freqHz=50; invalid values raise JSON-RPC -32602. Returns: sourceMode, studyClassification, optionsApplied, compiled, shortCircuit, loadFlow, busesSummary, calculationTrace, and legalNotice.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "sodural_solve_topology_whitebox"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoShort-circuit voltage factor regime ("auto", "max", or "min", defaults to "auto").auto
freqHzNoNominal system frequency in Hz (defaults to 50 Hz).
tablesNoOptional tabular JSON study tables (IBus, IUtility, IXFMR2, IXFMR3, Icable, IZigZagXFMR, IConnect, ICapacitor, ILoad, LFR, SCStudyCase, LFStudyCase); uses sandbox when omitted.
applyKTNoEnable or disable transformer impedance correction factor kT in fault mode (defaults to true).
cFactorNoOptional explicit short-circuit voltage factor c overriding regime defaults (0.1..2.0).
sBaseMvaNoPer-unit system base power S_base in MVA (defaults to 100 MVA).
iecMethodNoBackward-compatible alias for kappaMethod ("A", "B", or "C") selecting peak asymmetry law.
enableOltcNoActivate automatic On-Load Tap Changer voltage regulation during load flow (defaults to true).
faultedBusNoOptional busbar identifier substring filter to focus fault impedance and contribution matrices.
kappaMethodNoPeak asymmetrical current factor kappa method ("A", "B", or "C", defaults to "C").C
runLoadFlowNoExecute Newton-Raphson AC load-flow solver with OLTC loop (defaults to true).
sandboxParamsNoParameters passed to the built-in algebraic 225/20 kV sandbox network when tables is omitted.
runShortCircuitNoExecute symmetrical-component Z_bus short-circuit fault solver (defaults to true).
breakerOverridesNoSwitching-device state map { branchId: "OPEN" | "CLOSED" | boolean } applied before solving.
applyXfmrToleranceNoApply transformer short-circuit impedance tolerance band in fault sweep (defaults to true).
includeCableShuntY0NoInclude cable zero-sequence capacitive shunt admittance Y0 in earth-fault matrices (defaults to true).

Output Schema

NameRequiredDescriptionDefault
compiledNoCompiled network inventory and bus list.
loadFlowNoNewton-Raphson AC power-flow voltages, losses, and OLTC states.
sourceModeNoResolved network input source ("provided_tables" or "algebraic_sandbox").
legalNoticeNoNon-substitution intellectual-property banner adapted to the caller permission tier.
parityAuditNoInternal solver consistency audit.
busesSummaryNoCompact busbar inventory summary list.
shortCircuitNoSymmetrical-component Z_bus fault calculation results.
mvArchitectureNoMV switchboard sections, internal loops, and coupling topology summary.
optionsAppliedNoNormalized solver execution options.
calculationTraceNoTransparent audit trail listing inputs, defaults, SI formulas, constants, and engineering assumptions.
studyClassificationNoDetected tabular study classification.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed39 schema fields changed
    • addedInput schema / properties / applyKT / default
      Added value: +true
    • changedInput schema / properties / applyKT / description
      Previous value: -"Active/désactive l’application du facteur kT transformateur (notamment en mode min)."New value: +"Enable or disable transformer impedance correction factor kT in fault mode (defaults to true)."
    • addedInput schema / properties / applyXfmrTolerance / default
      Added value: +true
    • changedInput schema / properties / applyXfmrTolerance / description
      Previous value: -"Applique la tolérance sur impédance court-circuit transformateur (±tol%)."New value: +"Apply transformer short-circuit impedance tolerance band in fault sweep (defaults to true)."
    • addedInput schema / properties / breakerOverrides / additionalProperties
      Added value: +true
    • changedInput schema / properties / breakerOverrides / description
      Previous value: -"Dictionnaire d’état des organes de coupure { id: \"OPEN\"|\"CLOSED\" | boolean }."New value: +"Switching-device state map { branchId: \"OPEN\" | \"CLOSED\" | boolean } applied before solving."
    • addedInput schema / properties / breakerOverrides / properties
      Added value: +{}
    • changedInput schema / properties / cFactor / description
      Previous value: -"Facteur de tension c modèle analytique forcé optionnel."New value: +"Optional explicit short-circuit voltage factor c overriding regime defaults (0.1..2.0)."
    • addedInput schema / properties / cFactor / maximum
      Added value: +2
    • addedInput schema / properties / cFactor / minimum
      Added value: +0.1
    • addedInput schema / properties / enableOltc / default
      Added value: +true
    • changedInput schema / properties / enableOltc / description
      Previous value: -"Active la boucle de régulation OLTC en Load Flow. Défaut: true."New value: +"Activate automatic On-Load Tap Changer voltage regulation during load flow (defaults to true)."
    • changedInput schema / properties / faultedBus / description
      Previous value: -"Filtre optionnel sur un jeu de barres fautif spécifique pour concentrer les matrices et résultats."New value: +"Optional busbar identifier substring filter to focus fault impedance and contribution matrices."
    • addedInput schema / properties / freqHz / default
      Added value: +50
    • changedInput schema / properties / freqHz / description
      Previous value: -"Fréquence réseau en Hz (défaut: 50)."New value: +"Nominal system frequency in Hz (defaults to 50 Hz)."
    • addedInput schema / properties / freqHz / maximum
      Added value: +1000
    • addedInput schema / properties / freqHz / minimum
      Added value: +1
    • changedInput schema / properties / iecMethod / description
      Previous value: -"Alias de kappaMethod (A, B ou C)."New value: +"Backward-compatible alias for kappaMethod (\"A\", \"B\", or \"C\") selecting peak asymmetry law."
    • addedInput schema / properties / includeCableShuntY0 / default
      Added value: +true
    • changedInput schema / properties / includeCableShuntY0 / description
      Previous value: -"Inclut les admittances capacitives homopolaires shunt Y0 des câbles."New value: +"Include cable zero-sequence capacitive shunt admittance Y0 in earth-fault matrices (defaults to true)."
    • addedInput schema / properties / kappaMethod / default
      Added value: +"C"
    • changedInput schema / properties / kappaMethod / description
      Previous value: -"Méthode modèle analytique de calcul du facteur de crête kappa (A, B ou C)."New value: +"Peak asymmetrical current factor kappa method (\"A\", \"B\", or \"C\", defaults to \"C\")."
    • addedInput schema / properties / mode / default
      Added value: +"auto"
    • changedInput schema / properties / mode / description
      Previous value: -"Régime de court-circuit CEI 60909 (\"auto\", \"max\" ou \"min\"). Défaut: \"auto\" (détecte MAX/MIN via CFact3)."New value: +"Short-circuit voltage factor regime (\"auto\", \"max\", or \"min\", defaults to \"auto\")."
    • addedInput schema / properties / runLoadFlow / default
      Added value: +true
    • changedInput schema / properties / runLoadFlow / description
      Previous value: -"Exécute le solveur Load Flow Newton-Raphson. Défaut: true."New value: +"Execute Newton-Raphson AC load-flow solver with OLTC loop (defaults to true)."
    • addedInput schema / properties / runShortCircuit / default
      Added value: +true
    • changedInput schema / properties / runShortCircuit / description
      Previous value: -"Exécute le solveur court-circuit modèle analytique. Défaut: true."New value: +"Execute symmetrical-component Z_bus short-circuit fault solver (defaults to true)."
    • addedInput schema / properties / sBaseMva / default
      Added value: +100
    • changedInput schema / properties / sBaseMva / description
      Previous value: -"Puissance de base en MVA (défaut: 100)."New value: +"Per-unit system base power S_base in MVA (defaults to 100 MVA)."
    • addedInput schema / properties / sBaseMva / maximum
      Added value: +10000
    • addedInput schema / properties / sBaseMva / minimum
      Added value: +0.1
    • addedInput schema / properties / sandboxParams / additionalProperties
      Added value: +true
    • changedInput schema / properties / sandboxParams / description
      Previous value: -"Paramètres passés à createAlgebraicSandboxNetwork(sandboxParams) si `tables` est omis."New value: +"Parameters passed to the built-in algebraic 225/20 kV sandbox network when tables is omitted."
    • addedInput schema / properties / sandboxParams / properties
      Added value: +{
      +  "htbKv": {
      +    "default": 225,
      +    "description": "Upstream HV source nominal voltage in kV (defaults to 225 kV).",
      +    "type": "number"
      +  },
      +  "nomHtaKv": {
      +    "default": 20,
      +    "description": "Downstream MV busbar nominal voltage in kV (defaults to 20 kV).",
      +    "type": "number"
      +  },
      +  "sScMva": {
      +    "default": 5000,
      +    "description": "Upstream HV grid fault power in MVA (defaults to 5000 MVA).",
      +    "type": "number"
      +  },
      +  "xfmrMva": {
      +    "default": 40,
      +    "description": "Interconnecting HV/MV transformer rating in MVA (defaults to 40 MVA).",
      +    "type": "number"
      +  }
      +}
    • addedInput schema / properties / tables / additionalProperties
      Added value: +true
    • changedInput schema / properties / tables / description
      Previous value: -"Tables ETAP JSON (IBus, IUtility, IXFMR2, IXFMR3, Icable, IZigZagXFMR, IConnect, ICapacitor, ILoad, LFR, LFSumLoss, SCStudyCase, LFStudyCase, etc.)."New value: +"Optional tabular JSON study tables (IBus, IUtility, IXFMR2, IXFMR3, Icable, IZigZagXFMR, IConnect, ICapacitor, ILoad, LFR, SCStudyCase, LFStudyCase); uses sandbox when omitted."
    • addedInput schema / properties / tables / properties
      Added value: +{
      +  "IBus": {
      +    "description": "Busbar rows (IBus) with nominal kV and bus type.",
      +    "items": {
      +      "additionalProperties": true,
      +      "description": "Tabular busbar entry in study table.",
      +      "properties": {
      +        "ID": {
      +          "description": "Busbar identifier in tabular study table.",
      +          "type": "string"
      +        },
      +        "NomkV": {
      +          "description": "Nominal busbar voltage in kV.",
      +          "type": "number"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "IXFMR2": {
      +    "description": "Two-winding transformer rows (IXFMR2).",
      +    "items": {
      +      "additionalProperties": true,
      +      "description": "Two-winding transformer entry row.",
      +      "properties": {
      +        "ID": {
      +          "description": "Two-winding transformer identifier.",
      +          "type": "string"
      +        },
      +        "PrimBus": {
      +          "description": "Primary busbar identifier.",
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  }
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "White-box Z_bus short-circuit and AC power-flow output with calculationTrace and legalNotice.",
      +  "properties": {
      +    "busesSummary": {
      +      "description": "Compact busbar inventory summary list.",
      +      "items": {
      +        "additionalProperties": true,
      +        "description": "Compiled busbar summary item.",
      +        "properties": {
      +          "id": {
      +            "description": "Compiled busbar identifier string.",
      +            "type": "string"
      +          },
      +          "nomkV": {
      +            "description": "Busbar nominal voltage in kV.",
      +            "type": "number"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "calculationTrace": {
      +      "additionalProperties": true,
      +      "description": "Transparent audit trail listing inputs, defaults, SI formulas, constants, and engineering assumptions.",
      +      "properties": {
      +        "defaultsApplied": {
      +          "additionalProperties": true,
      +          "description": "Default SI parameters injected when optional inputs are omitted.",
      +          "properties": {},
      +          "type": "object"
      +        },
      +        "engineeringAssumptions": {
      +          "description": "Boundary conditions assumed by the calculation engine.",
      +          "items": {
      +            "description": "Validity assumption constraining interpretation.",
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "formulasAndConstants": {
      +          "additionalProperties": true,
      +          "description": "Mathematical formulas and constants applied during evaluation.",
      +          "properties": {
      +            "constants": {
      +              "additionalProperties": true,
      +              "description": "Physical constants and conversion coefficients in SI units.",
      +              "properties": {},
      +              "type": "object"
      +            },
      +            "formulas": {
      +              "description": "Evaluated physical formulas.",
      +              "items": {
      +                "description": "Symbolic SI physics equation.",
      +                "type": "string"
      +              },
      +              "type": "array"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "inputsProvided": {
      +          "additionalProperties": true,
      +          "description": "Caller-supplied parameters normalized before execution.",
      +          "properties": {},
      +          "type": "object"
      +        },
      +        "mode": {
      +          "description": "Executed physics calculation sub-mode for this call.",
      +          "type": "string"
      +        },
      +        "physicalPrinciples": {
      +          "description": "Ordered physical principles backing the solver.",
      +          "items": {
      +            "description": "Physical principle governing the analytical model.",
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "tool": {
      +          "description": "Canonical MCP tool identifier recorded by the calculation tracer.",
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "compiled": {
      +      "additionalProperties": true,
      +      "description": "Compiled network inventory and bus list.",
      +      "properties": {
      +        "branchCount": {
      +          "description": "Count of compiled electrical branches.",
      +          "type": "integer"
      +        },
      +        "busCount": {
      +          "description": "Count of compiled busbars.",
      +          "type": "integer"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "legalNotice": {
      +      "description": "Non-substitution intellectual-property banner adapted to the caller permission tier.",
      +      "type": "string"
      +    },
      +    "loadFlow": {
      +      "additionalProperties": true,
      +      "description": "Newton-Raphson AC power-flow voltages, losses, and OLTC states.",
      +      "properties": {
      +        "converged": {
      +          "description": "True when both Newton-Raphson and OLTC loops converged.",
      +          "type": "boolean"
      +        },
      +        "iterations": {
      +          "description": "Total Newton-Raphson solver iterations executed.",
      +          "type": "integer"
      +        },
      +        "totalLossMw": {
      +          "description": "Total active network losses in MW.",
      +          "type": "number"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "mvArchitecture": {
      +      "additionalProperties": true,
      +      "description": "MV switchboard sections, internal loops, and coupling topology summary.",
      +      "properties": {
      +        "couplingMode": {
      +          "description": "Detected MV busbar coupling operating topology classification.",
      +          "type": "string"
      +        },
      +        "internalLoops": {
      +          "description": "List of internal MV cable loops and open-point metadata.",
      +          "items": {
      +            "additionalProperties": true,
      +            "description": "Internal MV loop structural summary.",
      +            "properties": {
      +              "isClosed": {
      +                "description": "True when all switching devices closing the MV loop are closed.",
      +                "type": "boolean"
      +              },
      +              "loopId": {
      +                "description": "Unique identifier of the detected internal MV loop.",
      +                "type": "string"
      +              },
      +              "loopKind": {
      +                "description": "Loop topological class (open-point, closed, or spur-on-loop).",
      +                "type": "string"
      +              },
      +              "nMinus1Survives": {
      +                "description": "True when N-1 supply continuity survives a single branch outage.",
      +                "type": "boolean"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "rameCount": {
      +          "description": "Count of distinct MV busbar sections detected in the network.",
      +          "type": "integer"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "optionsApplied": {
      +      "additionalProperties": true,
      +      "description": "Normalized solver execution options.",
      +      "properties": {
      +        "effectiveMode": {
      +          "description": "Applied regime (\"max\" or \"min\").",
      +          "type": "string"
      +        },
      +        "iecMethod": {
      +          "description": "Applied kappa calculation method (\"A\", \"B\", or \"C\").",
      +          "type": "string"
      +        },
      +        "mode": {
      +          "description": "Requested fault regime mode.",
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "parityAudit": {
      +      "additionalProperties": true,
      +      "description": "Internal solver consistency audit.",
      +      "properties": {
      +        "overallPass": {
      +          "description": "True when internal solver consistency checks pass.",
      +          "type": "boolean"
      +        },
      +        "summary": {
      +          "description": "Compact consistency audit summary text.",
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "shortCircuit": {
      +      "additionalProperties": true,
      +      "description": "Symmetrical-component Z_bus fault calculation results.",
      +      "properties": {
      +        "busResults": {
      +          "description": "Faulted bus short-circuit impedances and currents.",
      +          "items": {
      +            "additionalProperties": true,
      +            "description": "Per-bus fault current result.",
      +            "properties": {
      +              "busId": {
      +                "description": "Faulted busbar identifier string.",
      +                "type": "string"
      +              },
      +              "ikpp3phKa": {
      +                "description": "Initial three-phase symmetrical fault current in kA.",
      +                "type": "number"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "freqHz": {
      +          "description": "Nominal system frequency in Hz.",
      +          "type": "number"
      +        },
      +        "sBaseMva": {
      +          "description": "System base power in MVA.",
      +          "type": "number"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "sourceMode": {
      +      "description": "Resolved network input source (\"provided_tables\" or \"algebraic_sandbox\").",
      +      "type": "string"
      +    },
      +    "studyClassification": {
      +      "additionalProperties": true,
      +      "description": "Detected tabular study classification.",
      +      "properties": {
      +        "kind": {
      +          "description": "Detected electrical study category label.",
      +          "type": "string"
      +        },
      +        "regime": {
      +          "description": "Inferred operating regime.",
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Goes well beyond the annotations: declares the solver stateless, read-only and deterministic, discloses an HTTP rate limit (120 req/min/IP), lists the default operating point for seven flags, and states that invalid values raise JSON-RPC -32602. The only remaining gap is runtime/cost behavior for large multi-bus studies, which the definition does not characterize.

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-loads the capability sentence, then uses labeled segments (When to use, Do not use, Behavior, Returns) that make scanning easy. It is dense with domain acronyms and the defaults enumeration is partially redundant with the schema, but no sentence is filler.

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 16-parameter, nested-object solver with an output schema, the description covers the essentials an agent needs: required inputs are optional and sandbox-backed, the default configuration is spelled out, error signaling is disclosed, and the return envelope is named. Nothing material is left implicit given that the output schema already defines return values.

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 every parameter already carries its own documentation, and the description's parameter mentions (mode="auto", kappaMethod="C", sBaseMva=100, freqHz=50, etc.) largely restate schema defaults. It adds little interpretive meaning beyond the schema, e.g. it does not clarify interactions such as cFactor overriding mode or iecMethod versus kappaMethod precedence.

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?

Names a specific verb (solve) and two concrete resource families (symmetrical-component Z_bus short-circuit and Newton-Raphson AC load flow), then enumerates the outputs it produces (Ik"3, Ik"1, ip, Ith, Z1/Z2/Z0) and the units (kA, Ohms, MW, MVAr). It also distinguishes itself from siblings by name, so an agent can route between this and the trace/thermal/TCC tools without opening any 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?

Contains an explicit 'When to use' clause scoped to coupled multi-bus fault currents, nodal impedances and voltage profiles, plus a 'Do not use for' clause that names the three correct alternatives for graph-only tracing, single-breaker Ith duty, and relay curve coordination. Both the positive and negative selection conditions are stated.

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