Skip to main content
Glama

sodural-electrical-mcp

PCC Varmetric Balance, Capacitor Switching & P-Q

sodural_calc_reactive_varmetric
Read-onlyIdempotent

Computes 10-100% load-profile PCC reactive balance Q = omegaCU^2 and tan(phi) against utility tariff reactive power-factor envelopes, back-to-back capacitor step switching peak I_peak = sqrt(2/3)Unsqrt(C/L_choc) and discharge resistors, synchronous machine P-Q capability with ANSI 40 loss-of-field mho offset relay circles, and transformer voltage-dip propagation versus sensitive industrial equipment voltage-dip ride-through envelopes. When to use: Use when balancing site reactive compensation, sizing L_choc damping reactors, or checking generator under-excitation margins. Do not use for harmonic filter resonance scans or multi-bus AC load flow; call sodural_calc_power_harmonics or sodural_solve_topology_whitebox instead. Behavior: Zero-side-effect, stateless, read-only SI engine (120 req/min/IP HTTP ceiling, JSON-RPC -32602 on bad parameters); defaults to mode="varmetric", presetId="dc_225_76mw_sel", selAutoMode=true, unKv=20, stepMvar=5, energizedStepsN=3, lChocUh=50, snMva=12, cosPhiRated=0.8. Returns: mode, reactiveBalance, capacitorSwitching, generatorPq, 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_calc_reactive_varmetric"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoReactive balance, transient switching, or P-Q study mode (defaults to "varmetric").varmetric
unKvNoMV capacitor bank busbar nominal voltage Un in kV (0.38..420 kV, defaults to 20 kV).
pOpPuNoGenerator operating active power P_op in per-unit of Sn (0..1.0 pu, defaults to 0.8 pu).
qOpPuNoGenerator operating reactive power Q_op in per-unit of Sn (-1.2..1.0 pu, defaults to -0.34 pu).
snMvaNoSynchronous generator rated apparent power Sn in MVA (0.5..1000 MVA, defaults to 12 MVA).
lChocUhNoCurrent-limiting air-core damping reactor inductance L_choc in uH (0..1000 uH, defaults to 50 uH).
presetIdNoReactive substation compensation plant preset identifier (defaults to "dc_225_76mw_sel").dc_225_76mw_sel
stepMvarNoUnit reactive power rating per capacitor step in Mvar (0.05..100 Mvar, defaults to 5 Mvar).
htaCableKmNoTotal MV XLPE underground cable route length in km (0..200 km; defaults to preset length).
htbCableKmNoTotal HV XLPE underground cable route length in km (0..100 km; defaults to preset length).
cosPhiRatedNoSynchronous generator rated lagging power factor cos(phi) (0.1..1.0, defaults to 0.8).
selAutoModeNoEnable automatic shunt reactor switching to avoid capacitive export penalties (defaults to true).
dipFaultTypeNoUpstream fault type for voltage-dip propagation ("SLG", "2L", "3L", defaults to "SLG").SLG
selReactorMvarNoShunt compensation reactor reactive rating in Mvar (0..200 Mvar; defaults to preset rating).
energizedStepsNNoNumber of capacitor bank steps already energized in parallel (1..10, defaults to 3).
transformerCouplingNoTransformer winding coupling chain for dip propagation (defaults to "Dyn11_Dyn11").Dyn11_Dyn11

Output Schema

NameRequiredDescriptionDefault
modeNoExecuted varmetric, capacitor switching, or P-Q study mode.
generatorPqNoSynchronous generator P-Q capability envelope and ANSI 40 mho offset relay circles.
legalNoticeNoNon-substitution intellectual-property banner adapted to the caller permission tier.
reactiveBalanceNoSite 10-100% reactive balance, OLTC coordination, and voltage-dip audit.
calculationTraceNoTransparent audit trail listing inputs, defaults, SI formulas, constants, and engineering assumptions.
capacitorSwitchingNoBack-to-back capacitor step switching transient and L_choc sizing report.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed54 schema fields changed
    • addedInput schema / properties / cosPhiRated / default
      Added value: +0.8
    • changedInput schema / properties / cosPhiRated / description
      Previous value: -"Facteur de puissance nominal alternateur."New value: +"Synchronous generator rated lagging power factor cos(phi) (0.1..1.0, defaults to 0.8)."
    • addedInput schema / properties / cosPhiRated / maximum
      Added value: +1
    • addedInput schema / properties / cosPhiRated / minimum
      Added value: +0.1
    • addedInput schema / properties / dipFaultType / default
      Added value: +"SLG"
    • changedInput schema / properties / dipFaultType / description
      Previous value: -"Type de défaut pour propagation creux."New value: +"Upstream fault type for voltage-dip propagation (\"SLG\", \"2L\", \"3L\", defaults to \"SLG\")."
    • changedInput schema / properties / dipFaultType / enum
      Previous value: -[
      -  "SLG",
      -  "2L",
      -  "3L"
      -]New value: +[
      +  "SLG",
      +  "2L",
      +  "3L",
      +  "LL",
      +  "LLG",
      +  "3PH"
      +]
    • addedInput schema / properties / energizedStepsN / default
      Added value: +3
    • changedInput schema / properties / energizedStepsN / description
      Previous value: -"Nombre de gradins déjà sous tension."New value: +"Number of capacitor bank steps already energized in parallel (1..10, defaults to 3)."
    • addedInput schema / properties / energizedStepsN / maximum
      Added value: +10
    • addedInput schema / properties / energizedStepsN / minimum
      Added value: +1
    • changedInput schema / properties / htaCableKm / description
      Previous value: -"Longueur totale cumulée câbles XLPE HTA (km)."New value: +"Total MV XLPE underground cable route length in km (0..200 km; defaults to preset length)."
    • addedInput schema / properties / htaCableKm / maximum
      Added value: +200
    • addedInput schema / properties / htaCableKm / minimum
      Added value: +0
    • changedInput schema / properties / htbCableKm / description
      Previous value: -"Longueur totale cumulée câbles XLPE HTB (km)."New value: +"Total HV XLPE underground cable route length in km (0..100 km; defaults to preset length)."
    • addedInput schema / properties / htbCableKm / maximum
      Added value: +100
    • addedInput schema / properties / htbCableKm / minimum
      Added value: +0
    • addedInput schema / properties / lChocUh / default
      Added value: +50
    • changedInput schema / properties / lChocUh / description
      Previous value: -"Inductance self de choc L_choc (µH)."New value: +"Current-limiting air-core damping reactor inductance L_choc in uH (0..1000 uH, defaults to 50 uH)."
    • addedInput schema / properties / lChocUh / maximum
      Added value: +1000
    • addedInput schema / properties / lChocUh / minimum
      Added value: +0
    • addedInput schema / properties / mode / default
      Added value: +"varmetric"
    • changedInput schema / properties / mode / description
      Previous value: -"Mode d’analyse varmétrique / P-Q (défaut: complet)."New value: +"Reactive balance, transient switching, or P-Q study mode (defaults to \"varmetric\")."
    • addedInput schema / properties / pOpPu / default
      Added value: +0.8
    • changedInput schema / properties / pOpPu / description
      Previous value: -"Puissance active point de fonctionnement P_op (p.u.)."New value: +"Generator operating active power P_op in per-unit of Sn (0..1.0 pu, defaults to 0.8 pu)."
    • addedInput schema / properties / pOpPu / maximum
      Added value: +1
    • addedInput schema / properties / pOpPu / minimum
      Added value: +0
    • addedInput schema / properties / presetId / default
      Added value: +"dc_225_76mw_sel"
    • changedInput schema / properties / presetId / description
      Previous value: -"Preset site (dc_225_76mw_sel, indus_20kv_4x5mvar, cogen_20kv_12mva, rfg_d_225kv_120mva)."New value: +"Reactive substation compensation plant preset identifier (defaults to \"dc_225_76mw_sel\")."
    • addedInput schema / properties / qOpPu / default
      Added value: +-0.34
    • changedInput schema / properties / qOpPu / description
      Previous value: -"Puissance réactive point de fonctionnement Q_op (p.u.)."New value: +"Generator operating reactive power Q_op in per-unit of Sn (-1.2..1.0 pu, defaults to -0.34 pu)."
    • addedInput schema / properties / qOpPu / maximum
      Added value: +1
    • addedInput schema / properties / qOpPu / minimum
      Added value: +-1.2
    • addedInput schema / properties / selAutoMode / default
      Added value: +true
    • changedInput schema / properties / selAutoMode / description
      Previous value: -"Mode SEL automatique anti-pénalité heures creuses."New value: +"Enable automatic shunt reactor switching to avoid capacitive export penalties (defaults to true)."
    • changedInput schema / properties / selReactorMvar / description
      Previous value: -"Puissance réactance shunt SEL (Mvar)."New value: +"Shunt compensation reactor reactive rating in Mvar (0..200 Mvar; defaults to preset rating)."
    • addedInput schema / properties / selReactorMvar / maximum
      Added value: +200
    • addedInput schema / properties / selReactorMvar / minimum
      Added value: +0
    • addedInput schema / properties / snMva / default
      Added value: +12
    • changedInput schema / properties / snMva / description
      Previous value: -"Puissance apparente alternateur (MVA)."New value: +"Synchronous generator rated apparent power Sn in MVA (0.5..1000 MVA, defaults to 12 MVA)."
    • addedInput schema / properties / snMva / maximum
      Added value: +1000
    • addedInput schema / properties / snMva / minimum
      Added value: +0.5
    • addedInput schema / properties / stepMvar / default
      Added value: +5
    • changedInput schema / properties / stepMvar / description
      Previous value: -"Puissance unitaire d’un gradin batterie (Mvar)."New value: +"Unit reactive power rating per capacitor step in Mvar (0.05..100 Mvar, defaults to 5 Mvar)."
    • addedInput schema / properties / stepMvar / maximum
      Added value: +100
    • addedInput schema / properties / stepMvar / minimum
      Added value: +0.05
    • addedInput schema / properties / transformerCoupling / default
      Added value: +"Dyn11_Dyn11"
    • changedInput schema / properties / transformerCoupling / description
      Previous value: -"Chaîne de couplage transformateurs."New value: +"Transformer winding coupling chain for dip propagation (defaults to \"Dyn11_Dyn11\")."
    • removedInput schema / properties / transformerCoupling / enum
      Removed value: -[
      -  "Dyn11_Dyn11",
      -  "Dyn11_Yyn0",
      -  "Direct"
      -]
    • addedInput schema / properties / unKv / default
      Added value: +20
    • changedInput schema / properties / unKv / description
      Previous value: -"Tension jeu de barres batteries HTA (kV)."New value: +"MV capacitor bank busbar nominal voltage Un in kV (0.38..420 kV, defaults to 20 kV)."
    • addedInput schema / properties / unKv / maximum
      Added value: +420
    • addedInput schema / properties / unKv / minimum
      Added value: +0.38
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "Reactive varmetric balance, capacitor transient, and generator P-Q report with calculationTrace and legalNotice.",
      +  "properties": {
      +    "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"
      +    },
      +    "capacitorSwitching": {
      +      "additionalProperties": true,
      +      "description": "Back-to-back capacitor step switching transient and L_choc sizing report.",
      +      "properties": {
      +        "bareBackToBack": {
      +          "additionalProperties": true,
      +          "description": "Unmitigated back-to-back switching metrics.",
      +          "properties": {
      +            "compliant": {
      +              "description": "True when unmitigated transient meets breaker duty.",
      +              "type": "boolean"
      +            },
      +            "fHz": {
      +              "description": "Unmitigated transient inrush frequency in Hz.",
      +              "type": "number"
      +            },
      +            "iPeakKa": {
      +              "description": "Unmitigated back-to-back inrush peak in kA.",
      +              "type": "number"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "mitigatedBackToBack": {
      +          "additionalProperties": true,
      +          "description": "Series-reactor mitigated switching transient metrics.",
      +          "properties": {
      +            "allCompliant": {
      +              "description": "True if peak, frequency, and di/dt limits pass.",
      +              "type": "boolean"
      +            },
      +            "fHz": {
      +              "description": "Mitigated transient inrush frequency in Hz.",
      +              "type": "number"
      +            },
      +            "iPeakKa": {
      +              "description": "Mitigated back-to-back inrush peak in kA.",
      +              "type": "number"
      +            },
      +            "lChocUh": {
      +              "description": "Applied damping reactor inductance in uH.",
      +              "type": "number"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "sizingAndDischarge": {
      +          "additionalProperties": true,
      +          "description": "Damping reactor and discharge resistor sizing.",
      +          "properties": {
      +            "rdMaxMohm": {
      +              "description": "Maximum allowable discharge resistor in megaohms.",
      +              "type": "number"
      +            },
      +            "recommendedLChocUh": {
      +              "description": "Minimum recommended standard L_choc reactor in uH.",
      +              "type": "number"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "stepMvar": {
      +          "description": "Switched capacitor bank step size in Mvar.",
      +          "type": "number"
      +        },
      +        "unKv": {
      +          "description": "Evaluated capacitor busbar voltage in kV.",
      +          "type": "number"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "generatorPq": {
      +      "additionalProperties": true,
      +      "description": "Synchronous generator P-Q capability envelope and ANSI 40 mho offset relay circles.",
      +      "properties": {
      +        "cosPhiRated": {
      +          "description": "Generator rated lagging power factor.",
      +          "type": "number"
      +        },
      +        "operatingPoint": {
      +          "additionalProperties": true,
      +          "description": "Generator operating point versus capability and ANSI 40 circles.",
      +          "properties": {
      +            "inAnsi40Z1": {
      +              "description": "True if inside ANSI 40 Zone 1 circle.",
      +              "type": "boolean"
      +            },
      +            "inSslLimit": {
      +              "description": "True if inside steady-state stability limit.",
      +              "type": "boolean"
      +            },
      +            "inStatorLimit": {
      +              "description": "True if inside stator thermal circle.",
      +              "type": "boolean"
      +            },
      +            "pOpMw": {
      +              "description": "Operating active power in MW.",
      +              "type": "number"
      +            },
      +            "qOpMvar": {
      +              "description": "Operating reactive power in Mvar.",
      +              "type": "number"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "snMva": {
      +          "description": "Generator rated apparent power in MVA.",
      +          "type": "number"
      +        },
      +        "underExcHierarchyValid": {
      +          "description": "True when UEL, stability boundary, and ANSI 40 zones are safely ordered.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "legalNotice": {
      +      "description": "Non-substitution intellectual-property banner adapted to the caller permission tier.",
      +      "type": "string"
      +    },
      +    "mode": {
      +      "description": "Executed varmetric, capacitor switching, or P-Q study mode.",
      +      "type": "string"
      +    },
      +    "reactiveBalance": {
      +      "additionalProperties": true,
      +      "description": "Site 10-100% reactive balance, OLTC coordination, and voltage-dip audit.",
      +      "properties": {
      +        "dipPropagation": {
      +          "additionalProperties": true,
      +          "description": "Transformer voltage-dip propagation audit.",
      +          "properties": {
      +            "minResidualPu": {
      +              "description": "Minimum retained phase voltage after transformer transfer in pu.",
      +              "type": "number"
      +            },
      +            "passesItic": {
      +              "description": "True if dip meets data-processing equipment ride-through envelope.",
      +              "type": "boolean"
      +            },
      +            "passesSemiF47": {
      +              "description": "True if dip meets sensitive industrial equipment ride-through envelope.",
      +              "type": "boolean"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "presetId": {
      +          "description": "Resolved reactive compensation plant preset ID.",
      +          "type": "string"
      +        },
      +        "qcTotalMvar": {
      +          "description": "Total capacitive reactive generation from HV/MV cables in Mvar.",
      +          "type": "number"
      +        },
      +        "sweep": {
      +          "description": "10-100% load sweep reactive power table.",
      +          "items": {
      +            "additionalProperties": true,
      +            "description": "Load-step varmetric balance point.",
      +            "properties": {
      +              "loadPct": {
      +                "description": "Load percentage (10-100%).",
      +                "type": "number"
      +              },
      +              "qPccAutoMvar": {
      +                "description": "Net PCC reactive power in Mvar.",
      +                "type": "number"
      +              },
      +              "tanPhiAuto": {
      +                "description": "Resulting PCC power-factor tangent tan(phi) under auto control.",
      +                "type": "number"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "turpeImpact": {
      +          "additionalProperties": true,
      +          "description": "Utility tariff reactive power-factor envelope check.",
      +          "properties": {
      +            "allAutoPointsCompliant": {
      +              "description": "True if all 10-100% load points satisfy reactive thresholds.",
      +              "type": "boolean"
      +            },
      +            "selAutoMode": {
      +              "description": "True if automatic shunt switching is enabled.",
      +              "type": "boolean"
      +            }
      +          },
      +          "type": "object"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already establish readOnly, idempotent, non-destructive and closed-world, and the description adds operational facts annotations cannot carry: 120 req/min/IP HTTP ceiling, JSON-RPC -32602 on bad parameters, and statelessness. It also enumerates the default operating point (varmetric, dc_225_76mw_sel, unKv=20, stepMvar=5, energizedStepsN=3, lChocUh=50, snMva=12, cosPhiRated=0.8), which tells the agent the tool returns useful results with zero arguments.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The labeled 'When to use', 'Behavior' and 'Returns' sections are well front-loaded, but the opening sentence is a ~90-word run-on stacking four formulas and is slow to parse. The dense formula text partially duplicates what the physics already implies; trimming it would sharpen rather than weaken the definition.

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, four-mode engineering engine with all defaults optional, the description covers purpose, routing, safety profile, rate limits, error behavior, defaults and return keys. An output schema exists, so the brief 'Returns' list is sufficient rather than incomplete.

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?

Schema coverage is 100%, so the per-parameter baseline is 3 and the schema already documents ranges and defaults. The description nonetheless adds meaning beyond the schema by mapping the mode enum to study families (reactive balance, capacitor switching, P-Q diagram, transformer dip sensitivity), which the schema's enum wording only partially conveys.

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?

States a specific computational verb set against concrete engineering resources: reactive balance Q = omega*C*U^2, capacitor step switching peak current and discharge resistors, synchronous machine P-Q capability with ANSI 40 loss-of-field circles, and transformer voltage-dip propagation. The scope is unmistakably distinct from the named siblings, so an agent can route to it 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?

Contains an explicit 'When to use' clause (reactive compensation balancing, L_choc damping reactor sizing, generator under-excitation margins) and an explicit exclusion routing to sodural_calc_power_harmonics for harmonic resonance scans and sodural_solve_topology_whitebox for multi-bus load flow. Both the positive and negative conditions are named.

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