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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "design_id": "<design_id>"
    },
    "name": "couple_pairs"
  }
}

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 (default 55); a job still running comes back "running" for get_board_job.
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. Changed7 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / properties / design_id / pattern
      Removed value: -"^[A-Za-z0-9_-]{8,80}$"
    • removedInput schema / properties / ml_options / propertyNames
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / pairs / items / maxLength
      Removed value: -200
    • removedInput schema / properties / pairs / items / minLength
      Removed value: -1
    • removedInput schema / properties / pairs / maxItems
      Removed value: -500
    • 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; route_board's pipeline goes on from its last finished stage)."New value: +"Seconds to wait (default 55); a job still running comes back \"running\" for get_board_job."
  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. 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)."
  3. 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)."
  4. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the destructiveHint=true annotation, it discloses exactly what is ripped (both legs), the keep/discard rule for new copper, and the full acceptance gate: min_gain_pct coupling rise, max_skew_mm, no new open items or DRC errors, and max_extra_vias. That is genuine operational context an annotated flag cannot convey.

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 action and its precondition, and every sentence carries weight, though the acceptance-criteria sentence is a long, heavily comma-chained run-on that could be split for readability.

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, no-output-schema tool, the description covers what changes, what is kept, and the safety gates, but says nothing about the pairs/target_pct selection scope or that long runs may return 'running' (the latter only appears in the schema).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 83%, so the schema already documents every parameter's meaning and default; the description only re-names a few thresholds (min_gain_pct, max_skew_mm, max_extra_vias) as gate conditions and adds little new syntax or format detail.

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 and resource — re-route weakly coupled differential pairs one at a time, least coupled first — and scopes it explicitly against route_board ('After route_board'), so an agent can tell which tool to reach for without opening either 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?

Gives clear sequencing (after route_board), prerequisites and follow-up ('Run check_net_rules before and after'), plus the rationale sentence 'Pairs routed with the whole board lose their lanes; alone they couple' which explains why this tool exists alongside route_board.

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