Guided autoroute
pcb_route_guidedRoutes PCB nets deterministically using a guided plan or built-in heuristics, then validates copper with KiCad DRC and removes rejected tracks. Supports dry runs and comparison.
Instructions
Built-in deterministic router (no download): same plan + same board gives the same copper; KiCad's DRC judges the
result and copper it rejects is removed again. No plan = built-in heuristics.
plan (all optional, mm, net globs ok): order [nets], global {grid, via_cost, style, layers, time_budget_s,
engine: "v2" (default) | "guided"},
nets {"": {priority, width, layers, avoid:[[x0,y0,x1,y1]], corridor:[[x,y],..], max_vias, skip}},
diff_pairs [{p, n, gap, width}], regions [{rect, cost | forbid:true, layers, nets}]. Unknown fields are rejected.
ripup: none (default, keep existing tracks) | nets (re-route nets) | all. dry_run / compare never write.
Returns routed/total, failed [{net, from, to, reason, where, blocked_by}], per-net length and vias, DRC counts,
findings with fixes. A net with a pour only gets the pads the pour misses connected; ground without one is left
for pcb_pour. Routing nothing leaves the board untouched.
Examples: pcb_route_guided() · pcb_route_guided(ripup="all", plan={"order":["/USB_D?","*"]})
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "pcb_route_guided"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nets | No | Only route these nets (names or globs) | |
| plan | No | Routing heuristics (see description; pcb_route_plan returns the schema and a suggested plan). Omit for built-in defaults. | |
| ripup | No | none = keep existing tracks (default); nets = rip up and re-route `nets`; all = rip up every unlocked track first | |
| detail | No | Full engine diagnostics (default: compact result) | |
| render | No | attach a PNG (default false) | |
| compare | No | Score the existing routing vs. a guided re-route (implies dry_run + ripup='all'); returns both scores and which is better | |
| dry_run | No | Route a scratch copy: full report + picture, board not modified | |
| project | No | project path (default: active) | |
| while_open | No | refuse (default) | revert |