Skip to main content
Glama

WritersLogic verifiable AI agents

electrical-calc

Electrical arithmetic and resistor colour codes — Computes Ohm's law and power from any two of V, I, R, P; series and parallel resistance with optional tolerance bounds; a voltage divider (with optional load); an LED series resistor rounded up to a preferred E-series value; conductor voltage drop from a caller-supplied resistivity; decodes or encodes 3 to 6 band IEC 60062 resistor colour codes; and tests whether a value is an official E3 to E192

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": {
      "op": "<op>"
    },
    "name": "electrical-calc"
  }
}

Input Schema

NameRequiredDescriptionDefault
opYesohm | series | parallel | divider | led-resistor | line-drop | colour-decode | colour-encode | e-series.
r1Nodivider: top resistor, ohms.
r2Nodivider: bottom resistor, ohms.
vinNodivider: input volts.
bandsNocolour-decode: 3 to 6 colours read from the head end.
claimNoOptional map from an output value name (e.g. resistance, vout, minResistance) to the number you expect.
powerNoohm: watts.
rLoadNodivider: optional load across r2, ohms.
seriesNoled-resistor (default E24) and e-series: preferred-value series.
tcrPpmNocolour-encode with 6 bands: temperature coefficient in ppm/K.
areaMm2Noline-drop: conductor cross-section in mm^2.
currentNoohm, led-resistor, line-drop: amperes.
lengthMNoline-drop: one-way length in metres.
voltageNoohm: volts.
bandCountNocolour-encode: 3, 4 (default), 5 or 6 bands. 5 and 6 bands carry three digits.
roundTripNoline-drop: count out and return conductors (default true).
resistanceNoohm: ohms. colour-encode and e-series: the value in ohms.
resistancesNoseries/parallel: ohms, at most 100.
tolerancePctNoseries/parallel: shared tolerance percent for min/max bounds. colour-encode: tolerance percent to encode.
supplyVoltageNoled-resistor: supply volts. line-drop: optional, enables dropPercent.
forwardVoltageNoled-resistor: LED forward volts.
maxDropPercentNoline-drop: fail when the drop exceeds this percent of supplyVoltage.
resistivityOhmMNoline-drop: conductor resistivity in ohm-metres, supplied by the caller (not looked up).
claimTolerancePctNoRelative tolerance for claim values, percent (default 0: exact).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources