Skip to main content
Glama

pcb_calc_termination

Determine if a PCB net is electrically long and needs termination, then calculate resistor values for series, parallel, or Thevenin schemes based on flight time and rise time.

Instructions

Decide if a net needs termination and size the resistor(s).

Two questions the impedance calc does not answer: is this net electrically long for its edge rate, and -- if so -- what termination value? A net stays a lumped wire while its one-way flight time is under length_fraction of the rise time (Johnson & Graham's 1/6 rule by default; pass 1/2 for the looser convention); past the critical length the reflection arrives during the edge and the net must be matched to z0_ohms. Pure math, no Altium. Propagation speed uses the effective dielectric constant (Er for stripline; reduced for microstrip, Hammerstad when width_mils/dielectric_height_mils are given, else the 0.475*Er+0.67 approximation).

Args: length_mils: Routed (or estimated) net length. rise_time_ns: Signal edge rate (the driver's 10-90 % rise time). z0_ohms: Line characteristic impedance (size it with pcb_calc_impedance; default 50). dielectric_constant: er (default 4.2 FR-4). geometry: microstrip or stripline. driver_impedance_ohms: Driver output impedance, subtracted for the series value (Rs = Z0 - Rdriver). vcc: Supply rail; enables the Thevenin split option when > 0. width_mils, dielectric_height_mils: Microstrip geometry for the Hammerstad Er_eff (optional; falls back to the approximation). length_fraction: Electrically-long threshold (default 1/6). multi_load: True for a bus / multi-receiver net (recommends far-end Thevenin/parallel instead of source series).

Returns: {"ok": True, "needs_termination", "recommended", "critical_length_mils", "flight_time_ns", "options": {...}, "summary"} -- options carries the ideal and nearest-E24 resistor values (and the AC cap) for every applicable scheme.

Input Schema

NameRequiredDescriptionDefault
erNo
z0No
vccNo
z0_ohmsNo
geometryNomicrostrip
multi_loadNo
width_milsNo
height_milsNo
length_milsYes
rise_time_nsYes
length_fractionNo
driver_impedanceNo
dielectric_constantNo
driver_impedance_ohmsNo
dielectric_height_milsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.3/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden, and it does state the key behavioral fact: 'Pure math, no Altium' — no design mutation, no side effects. It also discloses the underlying model (Johnson & Graham 1/6 rule, Hammerstad Er_eff, the 0.475*Er+0.67 fallback), which is the sort of context annotations could never provide. It does not discuss precision/rounding limits of the math, a minor gap.

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 front-loaded: the decision the tool makes comes first, then the physical rationale, then Args, then Returns. The prose in the rationale paragraph is dense but each sentence carries technical content. The duplicate-parameter aliasing is not addressed anywhere, which is the one structural omission.

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 15-parameter engineering calculator with no annotations, the definition supplies the physics, the defaults, the unit conventions, and an explicit return shape with the meaning of the options map. An output schema exists, so the Returns block is bonus rather than required. The remaining hole is the alias parameters, which leaves ambiguity about which name an agent should pass.

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 description coverage is 0%, so the description must compensate, and it largely does: it gives units, defaults, and derivation for length_mils, rise_time_ns, z0_ohms, dielectric_constant, geometry, driver_impedance_ohms ('Rs = Z0 - Rdriver'), vcc, width_mils/dielectric_height_mils, length_fraction, and multi_load. However, four schema parameters — er, z0, height_mils, and driver_impedance — are undocumented aliases with no stated precedence over their canonical counterparts, which an agent could easily misuse.

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 states a specific verb and resource: 'Decide if a net needs termination and size the resistor(s).' It also positions itself explicitly against the sibling it complements ('Two questions the impedance calc does not answer'), so an agent can separate it from pcb_calc_impedance without reading either schema.

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 explains the decision context (electrically-long check, then termination value) and names the alternate convention (length_fraction 1/2 vs the 1/6 default) and the multi_load case that routes to Thevenin/parallel rather than series. It lacks an explicit 'do not use this when…' exclusion, which keeps it below a 5.

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