Skip to main content
Glama

WritersLogic business 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

B3.4/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden. It discloses meaningful traits such as optional tolerance bounds, optional divider load, rounding LED resistors up to preferred E-series values, caller-supplied resistivity, band counts, and official E-series testing, but it does not explain output shape, error handling, or the claim/claimTolerancePct behavior.

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?

The description is a dense but front-loaded single sentence that efficiently enumerates the tool's operations. It is appropriately sized for a multi-operation calculator, though the semicolon list is somewhat run-on and ends with an incomplete-looking trailing phrase.

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

Completeness3/5

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

For a complex tool with nine operations and 24 parameters, the description covers the main operations and several behaviors, but it lacks return-value semantics, error conditions, claim evaluation details, and defaults. The rich parameter schema helps, but with no output schema and no annotations, the description is only adequate.

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%, so the schema already documents the parameters in detail. The description adds some useful cross-parameter context, such as Ohm's law using any two of V/I/R/P and optional load/tolerance behavior, but it does not explain many important parameters like claim, claimTolerancePct, roundTrip, or maxDropPercent.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool provides electrical calculations and resistor colour-code handling, then enumerates specific operations such as Ohm's law, series/parallel resistance, voltage dividers, LED resistors, line drop, colour encode/decode, and E-series checks. It is specific about the resource and actions, though it does not explicitly differentiate itself from sibling tools.

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

Usage Guidelines3/5

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

The operation list implies when each mode is relevant, but there is no explicit when-to-use guidance, no exclusions, and no alternatives named. Selection is mostly left to the caller reading the operation names and schema.

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