Skip to main content
Glama

Electrician Calc: NEC & IEC wire calculator

Size wire and breaker for a load (NEC 310.16 / IEC 60364)

size_wire_for_load
Read-onlyIdempotent

Wire size and breaker size for a load by amps (or kW) and distance: NEC 310.16 ampacity with 310.15(B)(1) ambient correction and 310.15(C)(1) bundling adjustment, 240.4(D) small-conductor limits, 125 % for continuous loads (210.19(A)(1)), 75 °C / 60 °C terminations, NM-B at 60 °C; or IEC 60364-5-52 current-carrying capacity (Ib ≤ In ≤ Iz) for installation methods A1–E, PVC or XLPE, with temperature (B.52.14) and grouping (B.52.17) factors. Then the wire is upsized until the voltage drop is within the limit, and the result says whether ampacity or voltage drop decided it. Also gives the equipment grounding conductor (NEC 250.122) or protective conductor (IEC 60364-5-54).

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": {
      "length": "<length>"
    },
    "name": "size_wire_for_load"
  }
}

Input Schema

NameRequiredDescriptionDefault
kwNoLoad power in kW, instead of amps (uses voltage and power factor)
ampsNoLoad current, A
voltsNoSupply voltage, line-to-line for three phase. Default: NEC 120 V / 208 V, IEC 230 V / 400 V
lengthYesOne-way length of the run
supplyNosingle
standardNonec
conductorNoIEC tables here are copper onlycopper
temp_unitNoC
continuousNoNEC: load runs 3 h or more, so OCPD and wire at 125 % (210.19(A)(1)). EV chargers, water heaters: true
insulationNoIEC: PVC 70 °C or XLPE/EPR 90 °Cpvc
length_unitNoDefault: ft for NEC, m for IEC
ambient_tempNoAmbient temperature
power_factorNo
nec_wire_typeNoNM-B (Romex) is held to the 60 °C column (334.80); THHN/THWN-2 in conduit uses 90 °C for deratingnm-b
install_methodNoIEC installation method: A1/A2 in conduit in an insulated wall, B1/B2 conduit or trunking on a wall, C clipped direct, E on a perforated trayC
grouped_circuitsNoIEC: circuits bunched together (Table B.52.17)
max_drop_percentNoVoltage drop limit, %
terminal_rating_cNoNEC equipment terminal rating, °C
current_carrying_conductorsNoNEC: current-carrying conductors in the raceway or cable (Table 310.15(C)(1))

Output Schema

NameRequiredDescriptionDefault
moreYes
basisYesWhich check decided the size, with the code rule
stepsYes
methodYes
safetyYes
standardYes
warningsYes
conductorYes
load_ampsYes
wire_sizeYesSize to install, or null when nothing in the table fits
governed_byYes
ambient_usedYes
breaker_ampsYesOvercurrent device: NEC 240.6(A) or IEC standard rating
ampacity_ruleYes
derating_factorYes
size_by_ampacityYes
voltage_drop_voltsYes
grounding_conductorYesNEC Table 250.122 (and 250.122(B) when upsized for drop) or IEC 60364-5-54 Table 54.2
size_by_voltage_dropYes
voltage_drop_percentYes
ampacity_derated_ampsYes
voltage_at_load_voltsYes
size_if_not_continuousNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare this as a read-only, idempotent, closed-world calculation, so the bar is lower, and the description still discloses the full computation pipeline: ampacity correction, adjustment, small-conductor limits, termination temperature columns, then voltage-drop upsizing. It also says the result reports whether ampacity or voltage drop governed and returns the grounding/protective conductor, which an agent could not infer from the annotations.

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?

Purpose and inputs are front-loaded followed by rule detail, and no sentence is filler. It is very dense with code citations and abbreviations (310.15(B)(1), B.52.17, Ib ≤ In ≤ Iz), which trades some readability for information density.

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

Completeness4/5

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

For a 19-parameter engineering calculator with an output schema and full annotations, the description covers both code paths, the derating steps, the upsizing logic, and the accompanying conductor result. Remaining gaps such as output units and error/feasibility cases are largely handled by the output schema or unaddressed but non-blocking.

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 79%, so the baseline sits at 3, but the description adds genuine meaning by tying parameters to rules: 125% for continuous loads (210.19(A)(1)), NM-B held to the 60 °C column, ambient (B.52.14) and grouping (B.52.17) adjustments, and Ib ≤ In ≤ Iz for IEC. That explains why 'continuous', 'nec_wire_type', 'insulation', and 'grouped_circuits' matter, not just what they are.

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 verb-and-resource pair ('wire size and breaker size for a load') with the two governing standards named. It also implicitly separates itself from siblings like calculate_voltage_drop by saying the wire is upsized until voltage drop is within the limit and that the result reports which criterion decided the size.

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

Usage Guidelines4/5

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

Supplies clear selection context: size by amps or kW plus one-way length, and pick 'nec' vs 'iec' for the applicable code regime. It never explicitly excludes alternatives (e.g. 'use calculate_voltage_drop if you only need the drop, not the size'), so routing is implied rather than 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.