Skip to main content
Glama

sodural-electrical-mcp

HV Distance 21 and Differential 87T Calculator

sodural_calc_ansi21_87t_hv
Read-onlyIdempotent

Compute standalone HV distance relay impedance zones Z1-Z4 in primary and secondary ohms, polar/rectangular kZ0, Van Warrington arc resistance, load encroachment blinders, power swing blocking, Source Impedance Ratio (SIR), and 2W/3W transformer 87T differential settings (Id>, K1/K2 slopes, H2/H5 restraint, vector compensation, and OLTC extreme-tap stability). When to use: Use this tool when sizing HV transmission distance zones or transformer 87T bias without external study files; do NOT use for MV TCC coordination, 67N polar sectors, or inrush curves (call sodural_calc_selectivity_tcc, brain_calc_homopolar_67n, or sodural_calc_transformer_inrush instead). Behavior: Stateless, read-only SI solver causing zero side effects (HTTP rate-limited at 120 req/min/IP); non-positive impedances or incoherent bus voltages raise JSON-RPC -32602. Defaults to 225 kV bus, 35 km line, 63 MVA YNd11 transformer, lang="fr". Returns: mode, busMetrics, ansi21, ansi87t, 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_ansi21_87t_hv"
  }
}

Input Schema

NameRequiredDescriptionDefault
busNoHV busbar voltage, minimum operating voltage, fault levels, and source X/R ratio.
langNoLocalization language code for labels and diagnostics ("fr" or "en", defaults to "fr").fr
lineNoTransmission line sequence impedances, CT/VT ratios, and fault arc length.
modeNoHV protection calculation mode selector (defaults to "standalone_hv_protection_settings").standalone_hv_protection_settings
transformerNoTwo- or three-winding power transformer nameplate, OLTC tap excursion, CT matching, and 87T slope settings.

Output Schema

NameRequiredDescriptionDefault
langNoResolved localization language code ("fr" or "en").
modeNoExecuted HV distance 21 / differential 87T calculation mode.
ansi21NoDistance ANSI 21 zone settings, kZ0 residual vector, arc resistance, and load blinder checks.
ansi87tNoDifferential 87T CT ratio matching, recommended settings, and OLTC stability summary.
busMetricsNoBusbar fault impedance, line impedance, and SIR classification metrics.
legalNoticeNoNon-substitution intellectual-property banner adapted to the caller permission tier.
si2sRequiredNoAlways false confirming standalone calculation without external study database.
calculationTraceNoTransparent audit trail listing inputs, defaults, SI formulas, constants, and engineering assumptions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changed
    • addedInput schema / properties / bus / additionalProperties
      Added value: +true
    • changedInput schema / properties / bus / description
      Previous value: -"Jeu de barres HTB : nominalKv, uMinKv, ik3MaxKa, ik1MinKa, xrRatio, freqHz."New value: +"HV busbar voltage, minimum operating voltage, fault levels, and source X/R ratio."
    • addedInput schema / properties / bus / properties
      Added value: +{
      +  "freqHz": {
      +    "default": 50,
      +    "description": "Nominal grid operating frequency in Hz (defaults to 50 Hz).",
      +    "maximum": 100,
      +    "minimum": 10,
      +    "type": "number"
      +  },
      +  "ik1MinKa": {
      +    "default": 3.5,
      +    "description": "Minimum single-phase earth-fault current in kA (defaults to 3.5 kA).",
      +    "minimum": 0.05,
      +    "type": "number"
      +  },
      +  "ik3MaxKa": {
      +    "default": 25,
      +    "description": "Maximum three-phase short-circuit current at HV bus in kA (defaults to 25 kA).",
      +    "minimum": 0.1,
      +    "type": "number"
      +  },
      +  "nominalKv": {
      +    "default": 225,
      +    "description": "HV bus nominal phase-to-phase voltage in kV (defaults to 225 kV).",
      +    "minimum": 1,
      +    "type": "number"
      +  },
      +  "uMinKv": {
      +    "description": "Minimum operating busbar voltage in kV for load encroachment checks.",
      +    "minimum": 1,
      +    "type": "number"
      +  },
      +  "xrRatio": {
      +    "default": 15,
      +    "description": "Equivalent upstream source fault X/R ratio (defaults to 15).",
      +    "minimum": 0.5,
      +    "type": "number"
      +  }
      +}
    • addedInput schema / properties / lang / default
      Added value: +"fr"
    • changedInput schema / properties / lang / description
      Previous value: -"Langue des libellés (fr | en)."New value: +"Localization language code for labels and diagnostics (\"fr\" or \"en\", defaults to \"fr\")."
    • addedInput schema / properties / line / additionalProperties
      Added value: +true
    • changedInput schema / properties / line / description
      Previous value: -"Ligne HTB : lengthKm, z1MagOhmPerKm, z1AngDeg, z0MagOhmPerKm, z0AngDeg, ctPrimaryA, ctSecondaryA, vtSecondaryPhaseV, arcLengthM."New value: +"Transmission line sequence impedances, CT/VT ratios, and fault arc length."
    • addedInput schema / properties / line / properties
      Added value: +{
      +  "arcLengthM": {
      +    "default": 2.5,
      +    "description": "Maximum phase-to-earth fault arc length in meters (defaults to 2.5 m).",
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  "ctPrimaryA": {
      +    "default": 1000,
      +    "description": "Line bay CT primary rating in amperes (defaults to 1000 A).",
      +    "minimum": 10,
      +    "type": "number"
      +  },
      +  "ctSecondaryA": {
      +    "default": 1,
      +    "description": "Line bay CT secondary rating in amperes (1 or 5 A, defaults to 1 A).",
      +    "type": "number"
      +  },
      +  "lengthKm": {
      +    "default": 35,
      +    "description": "Protected transmission line length in km (defaults to 35 km).",
      +    "minimum": 0.05,
      +    "type": "number"
      +  },
      +  "vtSecondaryPhaseV": {
      +    "default": 57.735,
      +    "description": "Line VT secondary phase-to-neutral voltage in V (defaults to 57.735 V).",
      +    "minimum": 10,
      +    "type": "number"
      +  },
      +  "z0AngDeg": {
      +    "default": 72,
      +    "description": "Zero-sequence impedance phase angle in degrees (defaults to 72 deg).",
      +    "type": "number"
      +  },
      +  "z0MagOhmPerKm": {
      +    "default": 1.18,
      +    "description": "Zero-sequence impedance magnitude |Z0| in ohm/km (defaults to 1.18).",
      +    "minimum": 0.01,
      +    "type": "number"
      +  },
      +  "z1AngDeg": {
      +    "default": 78,
      +    "description": "Positive-sequence impedance phase angle in degrees (defaults to 78 deg).",
      +    "type": "number"
      +  },
      +  "z1MagOhmPerKm": {
      +    "default": 0.39,
      +    "description": "Positive-sequence impedance magnitude |Z1| in ohm/km (defaults to 0.39).",
      +    "minimum": 0.01,
      +    "type": "number"
      +  }
      +}
    • addedInput schema / properties / mode / default
      Added value: +"standalone_hv_protection_settings"
    • changedInput schema / properties / mode / description
      Previous value: -"Mode d’exécution HTB (défaut: standalone_hv_protection_settings)."New value: +"HV protection calculation mode selector (defaults to \"standalone_hv_protection_settings\")."
    • addedInput schema / properties / transformer / additionalProperties
      Added value: +true
    • changedInput schema / properties / transformer / description
      Previous value: -"Transformateur HTB/HTA (2W ou 3W si tertKv/tertMva/isThreeWinding fourni) : snMva, snOnanMva, hvKv, lvKv, tertKv, secMva, tertMva, isThreeWinding, vectorGroup, uccPct, maxPosTapPct, maxNegTapPct, hvCtPrimaryA, hvCtSecondaryA, lvCtPrimaryA, lvCtSecondaryA, tertCtPrimaryA, is1Pu, k1SlopePct, is2Pu, k2SlopePct, harmonic2fBlockPct, harmonic5fBlockPct."New value: +"Two- or three-winding power transformer nameplate, OLTC tap excursion, CT matching, and 87T slope settings."
    • addedInput schema / properties / transformer / properties
      Added value: +{
      +  "hvKv": {
      +    "description": "HV winding rated line-to-line voltage in kV (defaults to bus nominalKv).",
      +    "minimum": 1,
      +    "type": "number"
      +  },
      +  "is1Pu": {
      +    "default": 0.25,
      +    "description": "Differential 87T basic pickup threshold Is1 in per-unit (defaults to 0.25 pu).",
      +    "minimum": 0.05,
      +    "type": "number"
      +  },
      +  "k1SlopePct": {
      +    "default": 25,
      +    "description": "Lower differential bias slope K1 in % (defaults to 25%).",
      +    "minimum": 5,
      +    "type": "number"
      +  },
      +  "k2SlopePct": {
      +    "default": 60,
      +    "description": "High-fault differential bias slope K2 in % (defaults to 60%).",
      +    "minimum": 10,
      +    "type": "number"
      +  },
      +  "lvKv": {
      +    "default": 21,
      +    "description": "Secondary MV winding rated line-to-line voltage in kV (defaults to 21 kV).",
      +    "minimum": 0.4,
      +    "type": "number"
      +  },
      +  "maxNegTapPct": {
      +    "default": 12,
      +    "description": "Maximum negative OLTC tap excursion in % (defaults to 12%).",
      +    "maximum": 40,
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  "maxPosTapPct": {
      +    "default": 12,
      +    "description": "Maximum positive OLTC tap excursion in % (defaults to 12%).",
      +    "maximum": 40,
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  "snMva": {
      +    "default": 63,
      +    "description": "Power transformer rated apparent power Sn in MVA (defaults to 63 MVA).",
      +    "minimum": 0.5,
      +    "type": "number"
      +  },
      +  "tertKv": {
      +    "description": "Optional tertiary winding voltage in kV triggering three-winding 87T analysis.",
      +    "minimum": 0.4,
      +    "type": "number"
      +  },
      +  "uccPct": {
      +    "default": 12.5,
      +    "description": "Transformer short-circuit impedance percentage Ucc (defaults to 12.5%).",
      +    "maximum": 50,
      +    "minimum": 1,
      +    "type": "number"
      +  },
      +  "vectorGroup": {
      +    "default": "YNd11",
      +    "description": "Winding phase-shift vector group string (defaults to \"YNd11\").",
      +    "type": "string"
      +  }
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "Standalone HV ANSI 21 distance and ANSI 87T differential settings with trace and legal notice.",
      +  "properties": {
      +    "ansi21": {
      +      "additionalProperties": true,
      +      "description": "Distance ANSI 21 zone settings, kZ0 residual vector, arc resistance, and load blinder checks.",
      +      "properties": {
      +        "lineSummary": {
      +          "additionalProperties": true,
      +          "description": "Primary and secondary line impedance summary.",
      +          "properties": {
      +            "z1PrimOhm": {
      +              "description": "Total line positive-sequence impedance in primary ohms.",
      +              "type": "number"
      +            },
      +            "z1SecOhm": {
      +              "description": "Total line positive-sequence impedance in secondary ohms.",
      +              "type": "number"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "zones": {
      +          "description": "Computed Z1, Z2, Z3, and Z4_REV impedance reaches.",
      +          "items": {
      +            "additionalProperties": true,
      +            "description": "Distance protection zone reach and delay record.",
      +            "properties": {},
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "ansi87t": {
      +      "additionalProperties": true,
      +      "description": "Differential 87T CT ratio matching, recommended settings, and OLTC stability summary.",
      +      "properties": {
      +        "isThreeWinding": {
      +          "description": "True when tertiary parameters triggered three-winding 87T evaluation.",
      +          "type": "boolean"
      +        },
      +        "oltcStability": {
      +          "additionalProperties": true,
      +          "description": "Extreme OLTC tap-changer through-fault stability verification.",
      +          "properties": {
      +            "allStableUnder085Criterion": {
      +              "description": "True when 0.85 * Iop stays above worst OLTC tap spill current.",
      +              "type": "boolean"
      +            },
      +            "worstTapMismatchPct": {
      +              "description": "Worst-case OLTC tap ratio mismatch percentage (%).",
      +              "type": "number"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "recommendedSettings": {
      +          "additionalProperties": true,
      +          "description": "Recommended 87T pickup, high-set, slope, and harmonic restraint parameters.",
      +          "properties": {
      +            "idPickupPu": {
      +              "description": "Recommended 87T differential pickup Id> in per-unit (pu).",
      +              "type": "number"
      +            },
      +            "k1SlopePct": {
      +              "description": "Recommended lower restraint slope K1 in percentage (%).",
      +              "type": "number"
      +            }
      +          },
      +          "type": "object"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "busMetrics": {
      +      "additionalProperties": true,
      +      "description": "Busbar fault impedance, line impedance, and SIR classification metrics.",
      +      "properties": {
      +        "lineClassification": {
      +          "description": "SIR line length classification (\"SHORT_HIGH_SIR\", \"MEDIUM_SIR\", or \"LONG_LOW_SIR\").",
      +          "type": "string"
      +        },
      +        "nominalKv": {
      +          "description": "Evaluated HV busbar nominal voltage in kV.",
      +          "type": "number"
      +        },
      +        "sirRatio": {
      +          "description": "Source Impedance Ratio Zs / Z1_line governing short/long line behavior.",
      +          "type": "number"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "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"
      +    },
      +    "lang": {
      +      "description": "Resolved localization language code (\"fr\" or \"en\").",
      +      "type": "string"
      +    },
      +    "legalNotice": {
      +      "description": "Non-substitution intellectual-property banner adapted to the caller permission tier.",
      +      "type": "string"
      +    },
      +    "mode": {
      +      "description": "Executed HV distance 21 / differential 87T calculation mode.",
      +      "type": "string"
      +    },
      +    "si2sRequired": {
      +      "description": "Always false confirming standalone calculation without external study database.",
      +      "type": "boolean"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered structurally. The description adds genuinely useful context beyond that: statelessness, zero side effects, a 120 req/min/IP rate limit, and the JSON-RPC -32602 error condition for non-positive impedances or incoherent bus voltages, plus the default parameter profile. It stops short of describing response semantics, but the output schema exists to carry that.

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 capability statement, then cleanly segmented by "When to use:", "Behavior:", and "Returns:" labels, so an agent can skim to the needed section. The opening enumeration is dense and runs long, 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 complex multi-mode protection solver with nested object parameters, the description covers capability, exclusions, statelessness, error triggers, defaults, and a return-field list. With an output schema present, nothing an agent needs in order to invoke it 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% with rich per-field defaults, units, and bounds, so the schema carries the parameter burden and baseline 3 applies. The description's mention of the default profile (225 kV, 35 km, 63 MVA YNd11, lang="fr") restates defaults already documented in the schema rather than adding new meaning.

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?

Uses a specific verb ("Compute") with an enumerated resource set: distance zones Z1-Z4 in primary and secondary ohms, kZ0, arc resistance, blinders, power swing blocking, SIR, and 87T differential settings with named parameters. The scope is unmistakable and separable from the listed siblings.

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?

Explicitly states "When to use" (sizing HV transmission distance zones or transformer 87T bias without external study files) and adds a hard "do NOT use for" with three named alternative tools for MV TCC, 67N polar sectors, and inrush curves. The routing decision is fully determined.

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