Skip to main content
Glama

pcb_get_differential_pairs

Enumerate every differential pair on the active PCB and report each half's length and skew to detect high-speed routing length-mismatch violations before fabrication.

Instructions

Enumerate every IPCB_DifferentialPair on the active PCB and report each pair's two halves with length skew.

Length mismatch between the two halves of a diff pair is one of the most common high-speed routing bugs. Transceiver specs:

  • USB 2.0: skew < 150 mils

  • USB 3.x SuperSpeed: skew < 5 mils per pair

  • HDMI: skew < 200 mils within pair, < 800 mils between

  • MIPI D-PHY (high-rate): skew < 5 mils

  • PCIe Gen3+: skew < 5 mils within lane

  • Ethernet PHY: typically < 50 mils Catching skew violations pre-fab saves a respin -- the agent should call this near the end of a layout review.

Returns one row per pair with:

  • name: pair name (e.g. "USB_DATA" if the SCH had .DiffPair directives USB_DATA_P / USB_DATA_N)

  • positive_net / negative_net: the two member nets

  • pos_length_mils / neg_length_mils: summed track + arc length for each half (signal layers only)

  • skew_mils: absolute difference, the number you compare against the transceiver spec

  • both_routed: false means one half is still ratsnest- only (lengths are unreliable in that state)

Uses the PCB API IPCB_DifferentialPair interface.

Returns: Dict with {count, pairs: [...]}.

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.4/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 well: it discloses that lengths come from summed track + arc length on signal layers only, and that both_routed=false means one half is ratsnest-only so lengths are unreliable. It doesn't state whether the tool is read-only or any permission/rate constraints, keeping it below 5.

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 purpose and behavior are front-loaded in the first sentences, and the returns section is well-structured. The six-line transceiver skew spec table is useful domain context but is somewhat bulky for a tool description; it earns most, not all, of its space.

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?

The output schema exists and the description complements it with field-by-field return semantics and the critical both_routed reliability caveat. For a no-input, read-only enumeration tool, an agent has everything needed to call and interpret it correctly.

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?

Zero parameters, so the baseline is 4. There is nothing for the description to disambiguate on input, and it correctly focuses on output and semantics instead.

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?

First sentence states a specific verb and resource: enumerate every IPCB_DifferentialPair on the active PCB and report each pair's halves with skew. This clearly separates it from siblings like pcb_get_diff_pair_rules (rules, not actual pairs) and pcb_get_trace_lengths (single-net lengths). An agent can identify the tool without opening its 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?

'Catching skew violations pre-fab saves a respin -- the agent should call this near the end of a layout review' gives clear when-to-use context and workflow placement. It stops short of naming explicit alternatives (e.g. pcb_calc_length_match or pcb_get_diff_pair_rules), so it's not 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