Skip to main content
Glama

design_compute_component_value

Compute manufacturable component values snapped to IEC 60063 E-series, applying standard sizing equations and reporting achieved results with error for electronic design.

Instructions

Compute a manufacturable component value, snapped to an E-series.

Use this instead of doing the arithmetic by hand: it applies the standard sizing equation, snaps to the nearest IEC 60063 preferred value, and reports the ACHIEVED result plus the error so you can see if the snap is good enough or a tighter series is needed.

Args: kind: Which calculation: - "nearest": snap value to the nearest preferred value. - "feedback_divider": regulator FB divider v_out = v_ref*(1+Rtop/Rbot); needs v_out, v_ref; optional r_bottom_ohms to fix the low side. - "resistor_divider": unloaded divider v_out = v_in*Rb/(Rt+Rb); needs v_in, v_out. - "led_resistor": series resistor; needs v_supply, v_forward, i_led_ma. - "rc_lowpass": first-order RC; needs f_cutoff_hz and exactly one of r_ohms / c_farads. - "crystal_load_caps": symmetric crystal load caps; needs c_load_pf (datasheet CL), optional c_stray_pf (default 5 pF per leg). - "i2c_pullup": bus pull-up window (NXP UM10204); needs v_bus, c_bus_pf, t_rise_ns (1000 standard / 300 fast / 120 fast-plus). - "divider_tolerance": worst-case output window of an unloaded divider; needs v_in, r_top_ohms, r_bottom_ohms, optional tol_pct (default 1). - "opamp_gain": Rf/Rin (or Rg) for a gain stage; needs gain and config (inverting / non_inverting). - "buck_inductor": buck inductor; needs v_in, v_out, i_out_a, f_sw_khz, optional ripple_pct (default 30). - "capacitor_energy": stored energy; needs c_farads, voltage. - "holdup_cap": bulk hold-up capacitance; needs i_load_a, t_s (hold-up time), v_drop (allowed sag). - "discharge_resistor": bleeder; needs c_farads, v_initial, v_final, t_s (discharge time). - "junction_temp": Tj = Ta + P*theta_JA; needs power_w, theta_ja, optional t_ambient (default 25). - "max_power": thermal derating; needs tj_max, theta_ja, optional t_ambient. - "required_theta_ja": package/heatsink sizing; needs power_w, tj_max, optional t_ambient. series: E-series name (E6/E12/E24/E48/E96). Default E96 for dividers/precision, pass E24 for jellybean R/C.

Returns: {"ok": True, ...fields..., "summary": "..."} or {"ok": False, "error": "..."}.

Input Schema

NameRequiredDescriptionDefault
t_sNo
gainNo
kindYes
v_inNo
v_busNo
v_outNo
v_refNo
valueNo
configNoinverting
r_ohmsNo
seriesNoE96
tj_maxNo
v_dropNo
i_out_aNo
power_wNo
tol_pctNo
v_finalNo
voltageNo
c_bus_pfNo
c_faradsNo
f_sw_khzNo
i_led_maNo
i_load_aNo
theta_jaNo
v_supplyNo
c_load_pfNo
t_ambientNo
t_rise_nsNo
v_forwardNo
v_initialNo
c_stray_pfNo
r_top_ohmsNo
ripple_pctNo
f_cutoff_hzNo
r_bottom_ohmsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does most of it: it discloses the sizing equation applied, IEC 60063 snapping, that the ACHIEVED value plus error is reported, and the failure mode (`ok: False` with an error string). It also documents non-obvious defaults (5 pF stray, 30% ripple, 25 °C ambient). It doesn't state that the tool is a pure/side-effect-free computation or how inputs are validated when a required per-kind argument is missing.

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?

It is long, but almost every line earns its place as the de facto schema documentation for 15 calculation kinds, and the core purpose and series guidance are front-loaded. The indented per-kind block is well structured, though a small amount of prose (e.g. the repeated "needs ...") could be tightened.

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 35-parameter, single-required-field multiplexed calculator, the description covers dispatch, per-kind required inputs, defaults, series selection and error signaling. Since an output schema exists, the return-value explanation is a bonus rather than a gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the schema gives bare types with titles like `r_bottom_ohms`, yet the description supplies meaning for every one of the 35 parameters via the per-kind breakdown, including which are conditional ("exactly one of `r_ohms` / `c_farads`") and which are optional with defaults. This is exactly the compensation a low-coverage schema requires.

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?

The opening sentence gives a specific verb and resource ("Compute a manufacturable component value, snapped to an E-series") and immediately distinguishes it from the manual alternative. The enumerated `kind` list makes the full scope of the tool concrete and unmistakable against siblings like `pcb_calc_impedance` or `pcb_calc_trace_width_for_current`, which are PCB-geometry calculators rather than part-value sizing.

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?

It explicitly says when to use it ("Use this instead of doing the arithmetic by hand") and gives per-kind selection guidance on which inputs each mode needs, plus practical guidance on choosing `series` (E96 for dividers/precision, E24 for jellybean R/C). It stops short of naming when NOT to use it or pointing at a specific sibling calculator for overlapping cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools