Skip to main content
Glama

Autonomous 0-DRC PCB Routing Foundry & Hardware MCP Server

Calculate PCB Trace Impedance & IPC-2152 Current

calculate_pcb_trace_impedance
Read-onlyIdempotent

Compute single-ended Z0 (Ohms), differential Zdiff (Ohms), copper thickness (mm), and IPC-2152 current sizing for outer microstrip or inner stripline traces. Call during stackup planning for USB, PCIe, Ethernet, or RF nets. Inputs use mm, oz, and Er; returns JSON impedance metrics. Example: mode='microstrip', trace_width_mm=0.25, dielectric_height_mm=0.19.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "mode": "microstrip",
      "trace_width_mm": 0.25,
      "dielectric_height_mm": 0.19
    },
    "name": "calculate_pcb_trace_impedance"
  }
}

Input Schema

NameRequiredDescriptionDefault
erNoSubstrate relative dielectric constant Er / Dk (>= 1.0).
modeNoTransmission line geometry: outer microstrip or inner stripline.microstrip
current_ampsNoTarget continuous DC current in Amperes for IPC-2152 sizing.
trace_width_mmNoCopper trace width W in millimeters (>= 0.02 mm).
max_temp_rise_cNoMaximum allowed conductor temperature rise in degrees Celsius (IPC-2152).
copper_weight_ozNoFinished copper weight in oz/ft^2 (1.0 oz = 35 um).
trace_spacing_mmNoEdge-to-edge differential pair spacing S in millimeters (>= 0.02).
dielectric_height_mmNoDielectric height H in millimeters to nearest reference plane.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changed
    • changedInput schema / properties / copper_weight_oz / description
      Previous value: -"Finished copper weight in ounces per square foot (oz/ft^2), where 1.0 oz equals 0.0348 mm (35 um). Typical values: 0.5, 1.0, or 2.0."New value: +"Finished copper weight in oz/ft^2 (1.0 oz = 35 um)."
    • changedInput schema / properties / copper_weight_oz / examples
      Previous value: -[
      -  1,
      -  2
      -]New value: +[
      +  1
      +]
    • changedInput schema / properties / current_amps / description
      Previous value: -"Target continuous DC current in Amperes (A) for IPC-2152 thermal sizing context. Example: 1.5."New value: +"Target continuous DC current in Amperes for IPC-2152 sizing."
    • changedInput schema / properties / current_amps / examples
      Previous value: -[
      -  1,
      -  1.5
      -]New value: +[
      +  1
      +]
    • changedInput schema / properties / dielectric_height_mm / description
      Previous value: -"Dielectric separation H in millimeters (mm) between the signal layer and nearest solid reference plane (>= 0.02 mm). Example: 0.19 for 7628 prepreg."New value: +"Dielectric height H in millimeters to nearest reference plane."
    • changedInput schema / properties / dielectric_height_mm / examples
      Previous value: -[
      -  0.19,
      -  0.2
      -]New value: +[
      +  0.19
      +]
    • changedInput schema / properties / er / description
      Previous value: -"Relative dielectric constant (Dk / Er) of the PCB laminate or prepreg at operating frequency (>= 1.0). Example: 4.29 for FR-4 prepreg, 3.48 for Rogers RO4350B."New value: +"Substrate relative dielectric constant Er / Dk (>= 1.0)."
    • changedInput schema / properties / er / examples
      Previous value: -[
      -  4.29,
      -  4.4
      -]New value: +[
      +  4.29
      +]
    • changedInput schema / properties / max_temp_rise_c / description
      Previous value: -"Maximum allowable conductor temperature rise above ambient in degrees Celsius (deg C) per IPC-2152. Example: 10.0 or 20.0."New value: +"Maximum allowed conductor temperature rise in degrees Celsius (IPC-2152)."
    • changedInput schema / properties / max_temp_rise_c / examples
      Previous value: -[
      -  10,
      -  20
      -]New value: +[
      +  10
      +]
    • changedInput schema / properties / mode / description
      Previous value: -"Transmission line geometry: 'microstrip' for outer layers (F.Cu/B.Cu over reference plane) or 'stripline' for inner layers sandwiched between two reference planes."New value: +"Transmission line geometry: outer microstrip or inner stripline."
    • changedInput schema / properties / mode / examples
      Previous value: -[
      -  "microstrip",
      -  "stripline"
      -]New value: +[
      +  "microstrip"
      +]
    • changedInput schema / properties / trace_spacing_mm / description
      Previous value: -"Edge-to-edge copper spacing S in millimeters (mm) between coupled differential pair traces, clamped to >= 0.02 mm. Example: 0.15."New value: +"Edge-to-edge differential pair spacing S in millimeters (>= 0.02)."
    • changedInput schema / properties / trace_spacing_mm / examples
      Previous value: -[
      -  0.15,
      -  0.2
      -]New value: +[
      +  0.15
      +]
    • changedInput schema / properties / trace_width_mm / description
      Previous value: -"Copper trace width W in millimeters (mm), clamped to >= 0.02 mm. Example: 0.25 for 50-Ohm microstrip on 4-layer FR-4."New value: +"Copper trace width W in millimeters (>= 0.02 mm)."
    • changedInput schema / properties / trace_width_mm / examples
      Previous value: -[
      -  0.15,
      -  0.25
      -]New value: +[
      +  0.25
      +]
  2. Changed8 schema fields changed
    • addedInput schema / properties / copper_weight_oz / examples
      Added value: +[
      +  1,
      +  2
      +]
    • addedInput schema / properties / current_amps / examples
      Added value: +[
      +  1,
      +  1.5
      +]
    • addedInput schema / properties / dielectric_height_mm / examples
      Added value: +[
      +  0.19,
      +  0.2
      +]
    • addedInput schema / properties / er / examples
      Added value: +[
      +  4.29,
      +  4.4
      +]
    • addedInput schema / properties / max_temp_rise_c / examples
      Added value: +[
      +  10,
      +  20
      +]
    • addedInput schema / properties / mode / examples
      Added value: +[
      +  "microstrip",
      +  "stripline"
      +]
    • addedInput schema / properties / trace_spacing_mm / examples
      Added value: +[
      +  0.15,
      +  0.2
      +]
    • addedInput schema / properties / trace_width_mm / examples
      Added value: +[
      +  0.15,
      +  0.25
      +]
  3. Changed9 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / copper_weight_oz / description
      Previous value: -"Copper weight (oz)."New value: +"Finished copper weight in ounces per square foot (oz/ft^2), where 1.0 oz equals 0.0348 mm (35 um). Typical values: 0.5, 1.0, or 2.0."
    • changedInput schema / properties / current_amps / description
      Previous value: -"DC current (A)."New value: +"Target continuous DC current in Amperes (A) for IPC-2152 thermal sizing context. Example: 1.5."
    • changedInput schema / properties / dielectric_height_mm / description
      Previous value: -"Height H (mm)."New value: +"Dielectric separation H in millimeters (mm) between the signal layer and nearest solid reference plane (>= 0.02 mm). Example: 0.19 for 7628 prepreg."
    • changedInput schema / properties / er / description
      Previous value: -"Substrate Er."New value: +"Relative dielectric constant (Dk / Er) of the PCB laminate or prepreg at operating frequency (>= 1.0). Example: 4.29 for FR-4 prepreg, 3.48 for Rogers RO4350B."
    • changedInput schema / properties / max_temp_rise_c / description
      Previous value: -"Max temp rise (C)."New value: +"Maximum allowable conductor temperature rise above ambient in degrees Celsius (deg C) per IPC-2152. Example: 10.0 or 20.0."
    • changedInput schema / properties / mode / description
      Previous value: -"Line geometry."New value: +"Transmission line geometry: 'microstrip' for outer layers (F.Cu/B.Cu over reference plane) or 'stripline' for inner layers sandwiched between two reference planes."
    • changedInput schema / properties / trace_spacing_mm / description
      Previous value: -"Spacing S (mm)."New value: +"Edge-to-edge copper spacing S in millimeters (mm) between coupled differential pair traces, clamped to >= 0.02 mm. Example: 0.15."
    • changedInput schema / properties / trace_width_mm / description
      Previous value: -"Width W (mm)."New value: +"Copper trace width W in millimeters (mm), clamped to >= 0.02 mm. Example: 0.25 for 50-Ohm microstrip on 4-layer FR-4."
  4. Changed9 schema fields changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "dielectric_height_mm": 0.19,
      -    "er": 4.29,
      -    "mode": "microstrip",
      -    "trace_width_mm": 0.25
      -  }
      -]New value: +[
      +  {
      +    "dielectric_height_mm": 0.19,
      +    "mode": "microstrip",
      +    "trace_width_mm": 0.25
      +  }
      +]
    • removedInput schema / properties / copper_weight_oz / examples
      Removed value: -[
      -  1
      -]
    • removedInput schema / properties / current_amps / examples
      Removed value: -[
      -  1
      -]
    • removedInput schema / properties / dielectric_height_mm / examples
      Removed value: -[
      -  0.2
      -]
    • removedInput schema / properties / er / examples
      Removed value: -[
      -  4.4
      -]
    • removedInput schema / properties / max_temp_rise_c / examples
      Removed value: -[
      -  10
      -]
    • removedInput schema / properties / mode / examples
      Removed value: -[
      -  "microstrip"
      -]
    • removedInput schema / properties / trace_spacing_mm / examples
      Removed value: -[
      -  0.15
      -]
    • removedInput schema / properties / trace_width_mm / examples
      Removed value: -[
      -  0.15
      -]
  5. Changed17 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "dielectric_height_mm": 0.19,
      +    "er": 4.29,
      +    "mode": "microstrip",
      +    "trace_width_mm": 0.25
      +  }
      +]
    • changedInput schema / properties / copper_weight_oz / description
      Previous value: -"Copper weight in oz/ft^2 (1.0 oz = 0.035 mm)"New value: +"Copper weight (oz)."
    • addedInput schema / properties / copper_weight_oz / examples
      Added value: +[
      +  1
      +]
    • changedInput schema / properties / current_amps / description
      Previous value: -"Target DC current in Amps for IPC-2152 temp rise check"New value: +"DC current (A)."
    • addedInput schema / properties / current_amps / examples
      Added value: +[
      +  1
      +]
    • changedInput schema / properties / dielectric_height_mm / description
      Previous value: -"Dielectric height H to reference plane in mm"New value: +"Height H (mm)."
    • addedInput schema / properties / dielectric_height_mm / examples
      Added value: +[
      +  0.2
      +]
    • changedInput schema / properties / er / description
      Previous value: -"Relative permittivity Er of substrate (FR-4 = 4.4)"New value: +"Substrate Er."
    • addedInput schema / properties / er / examples
      Added value: +[
      +  4.4
      +]
    • changedInput schema / properties / max_temp_rise_c / description
      Previous value: -"Maximum allowed temperature rise in Celsius"New value: +"Max temp rise (C)."
    • addedInput schema / properties / max_temp_rise_c / examples
      Added value: +[
      +  10
      +]
    • changedInput schema / properties / mode / description
      Previous value: -"Transmission-line geometry ('microstrip' on outer layer or 'stripline' between two reference planes)"New value: +"Line geometry."
    • addedInput schema / properties / mode / examples
      Added value: +[
      +  "microstrip"
      +]
    • changedInput schema / properties / trace_spacing_mm / description
      Previous value: -"Edge-to-edge spacing S in mm for differential pair"New value: +"Spacing S (mm)."
    • addedInput schema / properties / trace_spacing_mm / examples
      Added value: +[
      +  0.15
      +]
    • changedInput schema / properties / trace_width_mm / description
      Previous value: -"Trace width W in mm"New value: +"Width W (mm)."
    • addedInput schema / properties / trace_width_mm / examples
      Added value: +[
      +  0.15
      +]
  6. Changed1 schema field changed
    • addedInput schema / properties / mode / description
      Added value: +"Transmission-line geometry ('microstrip' on outer layer or 'stripline' between two reference planes)"
  7. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds what the agent needs beyond that: the tool returns JSON impedance metrics (relevant since there is no output schema) and that it is a pure computation with no side effects. It does not discuss error behavior for out-of-range inputs such as trace_width_mm below 0.02.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four tight sentences: outputs first, then when to call, then unit conventions and return shape, then a concrete example. Every sentence carries information an agent cannot get from the schema or annotations, and nothing is repeated verbatim from the title.

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?

With eight optional parameters, an enum mode, no output schema, and no annotations beyond safety hints, the description covers outputs, units, invocation context, and a sample call, which is close to sufficient. Minor gaps: it never mentions trace_spacing_mm, which only matters for differential Zdiff, nor that differential results require the spacing input.

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 coverage is 100%, so per-field semantics are already documented; the description adds the cross-cutting unit convention (mm, oz, Er) and a worked minimal call with mode, trace_width_mm, and dielectric_height_mm. That example is a real value-add because all eight parameters are optional and an agent needs to know a valid minimum invocation.

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 (compute) and enumerates the exact outputs: single-ended Z0, differential Zdiff, copper thickness in mm, and IPC-2152 current sizing, scoped to outer microstrip or inner stripline. No sibling tool in the list performs impedance calculation, so the resource is 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 says to call it 'during stackup planning for USB, PCIe, Ethernet, or RF nets', which gives a clear triggering context. It does not state when not to use it or name an alternative (e.g., a DFM audit or full board analyzer), but none of the siblings plausibly overlap.

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.