Skip to main content
Glama

pcb_calc_trace_width_for_current

Calculate the minimum PCB trace width needed to carry a target current using IPC-2221, including recommended width, layer, copper weight, temperature rise, margin, and optional voltage drop.

Instructions

Minimum track WIDTH to carry a target current (inverse IPC-2221).

The design-time complement of pcb_calc_track_current_capacity: instead of "what current does this width carry?", it answers "I need N amps, how wide?". Pure math, no Altium hit.

Solves I = k * dT^0.44 * (h*w)^0.725 for w with the same constants as the forward tool (so they round-trip), k = 0.048 external / 0.024 internal, h = copper_oz * 1.378 mils.

Args: current_amps: Target current the track must carry. The EasyEDA and KiCad builds spell this current_a; either is accepted here, so one call works on any backend. current_a: Alias for current_amps. copper_oz: Copper weight, oz/ft^2 (0.5 / 1.0 / 2.0 / 3.0). delta_t_c: Allowed temperature rise above ambient (10 degC is a common conservative budget; 20-30 degC for tight boards). layer: "external" (top/bottom) or "internal" (inner; needs ~2.6x the width for the same rise). margin: Fractional widening above the bare IPC minimum for the recommendation (default 0.2 = 20 %). length_mils: If > 0, also returns DC resistance and voltage drop at the recommended width.

Returns: {"ok": True, "min_width_mils", "recommended_width_mils", "copper_oz", "delta_t_c", "layer", ...optional resistance/drop} or {"ok": False, "reason": ...}.

Input Schema

NameRequiredDescriptionDefault
layerNoexternal
marginNo
copper_ozNo
current_aNo
delta_t_cNo
length_milsNo
current_ampsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: 'Pure math, no Altium hit' tells the agent this is a side-effect-free computation that touches no design document, which is the critical safety fact. It also discloses the exact formula and constants used, notes round-trip consistency with the forward tool, and describes both success and {"ok": False, "reason": ...} failure shapes.

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 core purpose and the sibling relationship are front-loaded in the first two sentences, and the Args/Returns blocks are information-dense rather than padded. It is somewhat long and restates the formula twice, but nearly every line carries actionable detail an agent would otherwise have to infer.

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 7-parameter computation tool with no annotations, the description covers the physics, the safe/stateless nature, per-parameter meaning and units, defaults, and the conditional extra outputs. An output schema exists, and the description's return summary is consistent with it, so nothing material is missing before invocation.

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%, so the description must do all the work and it does: every one of the 7 parameters is explained, including the current_amps/current_a alias (backend portability), copper_oz allowed values (0.5/1.0/2.0/3.0), layer's external/internal semantics with the ~2.6x width penalty for inner layers, margin's default 20% widening, and length_mils' >0 trigger for resistance/voltage-drop output.

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?

States a specific verb+resource (compute minimum track WIDTH for a target current) and immediately frames it against a named sibling: the inverse of pcb_calc_track_current_capacity, answering 'I need N amps, how wide?' rather than 'what current does this width carry?'. The IPC-2221 basis and formula make the operation unambiguous.

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?

Explicitly routes the agent to the forward tool pcb_calc_track_current_capacity for the opposite question, and gives practical selection guidance for delta_t_c (10 degC conservative, 20-30 for tight boards). It does not mention the other width sibling, pcb_calc_trace_width_for_impedance, nor state when not to use this tool, so it stops short of full when/when-not coverage.

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