Skip to main content
Glama
ShamanAndrey

kicad-mcp-layer

by ShamanAndrey

route_check

Read-onlyIdempotent

Measure routed length, skew, coupling, and layer changes for differential pairs on a KiCad board to check against interface limits.

Instructions

Measure every differential pair on a board: the routed length of each half, the skew between them against the interface's limit (Ethernet and MIPI 0.15 mm, PCIe and USB 3.0 0.1 mm, USB 2.0 0.15 mm by default, from the Compute Module 5 datasheet), the share of the pair that runs coupled at the net class's gap, width and gap deviations, and layer changes. Pairs are found by name (X_P/X_N, X_DP/X_DN, X+/X-); unrouted pairs are listed as such.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
board_pathYesA .kicad_pcb file, absolute or relative to the workspace.
project_pathNoThe .kicad_pro with the net classes; default: next to the board.
skew_limit_mmNoOverride the per-interface intra-pair skew limit for every pair.
via_length_mmNoLength added per via when measuring a half; default 1.6 mm, the board thickness.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
notesNo
pairsYes
summaryYes
verdictYes
unpairedNoNets that look like half a pair but have no mate.
board_pathYes
project_pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive, closed-world behavior, so the safety profile is covered. The description adds real behavioral substance on top: the default skew thresholds per interface with their datasheet source (CM5), the 1.6 mm default via length, the pairing-name heuristics, and that unrouted pairs are surfaced rather than skipped.

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?

Two dense sentences, zero filler, and the core action is front-loaded before the supporting detail. The parenthetical list of interfaces and thresholds is information-dense rather than redundant, so length is justified even if slightly packed.

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?

An output schema exists, so return values need not be described, and the description covers pairing detection, defaults, and threshold sourcing. What remains unstated is failure behavior (missing board, absent .kicad_pro for net classes) and whether results cover only differential pairs or all nets, but those are minor against the richness already present.

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 a baseline of 3 would be defensible. The description goes beyond the schema by stating the default skew limits that skew_limit_mm overrides (0.15 mm Ethernet/MIPI, 0.1 mm PCIe/USB 3.0, 0.15 mm USB 2.0) and their origin, and by tying the via_length_mm default to board thickness, which gives the numbers real meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource ('Measure every differential pair on a board') and then enumerates exactly what is measured: routed length per half, skew vs. interface limits, coupled share, and layer changes. It also states how pairs are discovered (X_P/X_N, X_DP/X_DN, X+/X-) and that unrouted pairs are reported. It is highly specific, though it never explicitly distinguishes itself from siblings like review_board, pcb_net_stats, or impedance_calc.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the usage context (checking differential-pair routing quality on a .kicad_pcb), and the per-interface skew limits hint at the scope (Ethernet, MIPI, PCIe, USB). But it gives no explicit when-to-use or when-not-to-use guidance, and no routing to alternatives such as impedance_calc or review_board.

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