Skip to main content
Glama

Couple differential pairs

couple_pairs
Destructive

After route_board: re-route the weakly coupled differential pairs one at a time, least coupled first. Both legs are ripped and routed alone around everything else as a pair; the new copper stays only when the pair's coupled share rises by min_gain_pct, its skew stays within max_skew_mm, KiCad counts no new open item or DRC error, and the board gains at most max_extra_vias vias. Pairs routed with the whole board lose their lanes; alone they couple. Run check_net_rules before and after.

Input Schema

NameRequiredDescriptionDefault
pairsNoOnly pairs with a leg matching these (default every pair under target_pct).
triesNoRouter seeds per pair; the best acceptable one is kept (default 2).
wait_sNoSeconds to wait for the job (default 55). A job still running comes back with status "running": follow it with get_board_job. A job is allowed the time its budget asks for (time_budget_s, total_budget_s, rounds), and survives a server restart (the op starts over from its snapshot; route_board's pipeline goes on from its last finished stage).
design_idYesThe design id returned by import_kicad_project or list_designs.
ml_optionsNo
target_pctNoPairs coupled below this are tried (default 70).
max_skew_mmNoLargest length mismatch kept (default: the pair's current skew, at least 1 mm).
min_gain_pctNoCoupling points a reroute must gain to be kept (default 10).
time_budget_sNoRouter budget per try (default 90).
bridge_islandsNo
max_extra_viasNoVias a kept reroute may add to the board (default 2).
total_budget_sNoStop starting pairs after this (default 1800).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / wait_s / description
      Previous value: -"Seconds to wait for the job (default 55). A job still running comes back with status \"running\": follow it with get_board_job. A job is allowed the time its budget asks for (time_budget_s, total_budget_s, rounds), and survives a server restart (the op starts over from its snapshot)."New value: +"Seconds to wait for the job (default 55). A job still running comes back with status \"running\": follow it with get_board_job. A job is allowed the time its budget asks for (time_budget_s, total_budget_s, rounds), and survives a server restart (the op starts over from its snapshot; route_board's pipeline goes on from its last finished stage)."
  2. Changed1 schema field changed
    • changedInput schema / properties / wait_s / description
      Previous value: -"Seconds to wait for the job (default 55). A job still running comes back with status \"running\": follow it with get_board_job."New value: +"Seconds to wait for the job (default 55). A job still running comes back with status \"running\": follow it with get_board_job. A job is allowed the time its budget asks for (time_budget_s, total_budget_s, rounds), and survives a server restart (the op starts over from its snapshot)."
  3. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond destructiveHint=true by disclosing the exact mutation ('both legs are ripped and routed alone') and the full acceptance gate that decides whether the new copper is kept: coupling gain, skew limit, no new opens/DRC errors, and a via budget. That tells the agent both what can be destroyed and when the board is left untouched.

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?

Front-loaded with the trigger and the ordering rule, then the acceptance criteria, then the sanity-check step. Dense but almost every clause carries information; the aphorism 'Pairs routed with the whole board lose their lanes; alone they couple' is evocative rather than precise and is the one soft spot.

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 12-parameter destructive routing operation with no output schema, the description covers trigger, mutation, keep/discard criteria, and follow-up verification, and wait_s in the schema routes the agent to get_board_job for long jobs. Minor gaps remain: bridge_islands and ml_options are unexplained and nothing says what the board looks like when no pair passes the gate.

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 83%, so the baseline is 3, and the prose adds real meaning for the gate parameters (min_gain_pct as coupling points, max_skew_mm as kept length mismatch, max_extra_vias as board-level via budget). However, bridge_islands and ml_options are undocumented in both schema and description, and tries/time_budget_s/total_budget_s get no prose treatment.

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 (re-route), resource (weakly coupled differential pairs), ordering rule (least coupled first) and prerequisite (after route_board). An agent can distinguish this from route_board and ripup_routing without opening any schema.

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

Usage Guidelines5/5

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

Explicit sequencing: 'After route_board' and 'Run check_net_rules before and after.' It also explains why this tool exists versus routing everything at once ('Pairs routed with the whole board lose their lanes; alone they couple') and scopes the work to pairs under target_pct.

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.

Resources