Skip to main content
Glama

Cable size, voltage drop and earth fault loop check

size_cable
Read-onlyIdempotent

Sizes a UK final circuit or sub-main and shows the working: design current (with cooker diversity), protective device rating, the smallest cable size that passes current-carrying capacity, voltage drop (3% lighting, 5% other) and earth fault loop impedance (Zs against the maximum for B, C or D breakers), plus a cpc adiabatic check. Returns recommended (size and every check with status pass, fail, indicative_pass, needs_input), sizes_considered (one line per size), must_check_against_regs (points the electrician confirms in BS 7671) and sources. Current-carrying capacity comes from a cautious heat-flow model, not BS 7671 tables, so it is marked indicative; give cable_size_mm2 plus tabulated_capacity_a from the regs for a firm check. Voltage drop and Zs are calculated from physics and are firm for the inputs given. Typical call: a 9.5 kW shower on an 18 m run clipped direct: {"circuit_type":"shower","load_kw":9.5,"run_length_m":18,"installation_method":"clipped_direct"}.

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": {
      "circuit_type": "<circuit_type>",
      "run_length_m": "<run_length_m>",
      "installation_method": "<installation_method>"
    },
    "name": "size_cable"
  }
}

Input Schema

NameRequiredDescriptionDefault
coresNoSWA only: number of cores. Defaults to 3 single phase (spare core as cpc) or 4 three phase. With 2 the armour is the cpc: give armour_resistance_mohm_per_m.
tradeNoOptional. The electrician's own business details (Nero Trade Profile v1). Used to prefill certificate contractor fields and to give a stable nero_trade_ref. Not stored by Spark Pack.
phasesNoDefaults to 1.
load_kwNoLoad in kW (for example 9.5 for a shower, 7.4 for a 32 A EV charger). Give this or design_current_a.
ze_ohmsNoMeasured external earth fault loop impedance Ze, ohms. Without it the typical network maximum is used (0.35 TN-C-S, 0.8 TN-S).
earthingNoSupply earthing. Defaults to tn_c_s (PME).
ambient_cNoAmbient temperature, C. Defaults to 30 in air, 20 in the ground.
cable_typeNoDefaults to twin_and_earth, or swa_xlpe for buried runs and sub-mains.
circuit_typeYesWhat the circuit feeds. ring_final and radial_sockets can be sized without a load (the device rating is used).
cpc_size_mm2NoOverride the circuit protective conductor size (twin and earth sizes are known).
power_factorNoDefaults to 1 (resistive loads, EV chargers). Use about 0.95 for heat pumps or mixed sub-main loads.
run_length_mYesCable length from the board to the furthest point, metres. For a ring, the total ring length.
cable_size_mm2NoCheck this specific size as well as finding the smallest that passes.
grouping_factorNoGrouping factor Cg from the regs for the arrangement, if known. Without it Spark Pack uses a cautious estimate.
design_current_aNoDesign current Ib in amps, if already known. Overrides load_kw.
grouped_circuitsNoNumber of circuits bunched together along the run, including this one. Defaults to 1.
cooker_has_socketNoCooker only: the cooker control unit has a socket outlet.
protective_deviceNoThe breaker or fuse. Leave rating_a out to let Spark Pack choose the smallest standard rating at or above the design current.
installation_methodYesHow the cable is run. clipped_direct: Clipped direct to a wall or surface, in free air; in_conduit_or_trunking_on_wall: In conduit or trunking fixed on a wall; in_conduit_in_insulated_wall: In conduit in a thermally insulated wall; touching_insulation_one_side: In a stud wall or ceiling void, touching thermal insulation on one side; surrounded_by_insulation: Totally surrounded by thermal insulation (deep loft insulation, insulated stud wall); above_ceiling_insulation_under_100mm: Clipped to a joist above a plasterboard ceiling, insulation 100 mm or less, cable not covered; buried_direct: Buried direct in the ground (about 0.7 m deep); in_duct_underground: In a duct in the ground (about 0.7 m deep). If the run passes through several, give the worst one (usually insulation).
tabulated_capacity_aNoTabulated current-carrying capacity It for cable_size_mm2 and this method, read from BS 7671 Appendix 4 by the electrician. Makes the capacity check firm.
apply_cooker_diversityNoCooker only: apply the usual domestic cooker diversity (default true).
soil_thermal_resistivityNoBuried runs: soil thermal resistivity K.m/W, defaults to 2.5 (cautious).
armour_resistance_mohm_per_mNoSWA armour resistance from the cable datasheet, milliohms per metre, when the armour is the cpc.
upstream_voltage_drop_percentNoVoltage drop already used upstream (for a circuit fed from a sub-board), percent.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/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 the description goes well beyond them by disclosing the provenance and confidence of each output: capacity comes from a heat-flow model and is marked indicative, while voltage drop and Zs are firm physics calculations for the given inputs. It also describes the exact return keys (recommended, sizes_considered, must_check_against_regs, sources) and the status vocabulary pass/fail/indicative_pass/needs_input.

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?

Well front-loaded: purpose and outputs first, then the indicative-vs-firm caveat, then a copyable example call. It is dense but each sentence carries information; the only minor cost is length for a 24-parameter tool.

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?

Given 24 parameters with a nested trade object and no output schema, the description fills the gap by summarizing the return structure and the status values, and by flagging the one substantive limitation (model-based capacity vs BS 7671 tables) plus the remedy. An agent has everything needed to call it and interpret the result correctly.

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 baseline is 3; the description adds real meaning on top by explaining the interaction between cable_size_mm2 and tabulated_capacity_a (the pair that upgrades an indicative capacity result to a firm one) and by showing the minimal viable argument set in the shower example. Most remaining parameter explanations still live in the schema, so it is a 4 rather than a 5.

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?

Opens with a specific verb+resource: sizes a UK final circuit or sub-main, and immediately enumerates the four checks it performs (design current, device rating, capacity, voltage drop, Zs, adiabatic cpc). This is clearly distinguishable from the sibling compliance-check tools like check_part_p and check_grid_connection, which do not size cables.

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?

Gives a concrete typical call and explains the key routing decision: use cable_size_mm2 plus tabulated_capacity_a when a firm regs-based capacity check is needed, otherwise the model result is indicative. It does not explicitly state when NOT to use this tool or name an alternative, so it stops short of a 5.

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.