Route (Freerouting / explicit)
pcb_routeAutomatically routes unrouted PCB connections with Freerouting, preserving existing tracks and vias, and can add explicit point-to-point tracks while preventing net conflicts.
Instructions
Route the board. mode='auto' (default without tracks): autoroute every unrouted connection with Freerouting (Java and the router are downloaded once into $COPPER_HOME/tools on first use). Existing tracks and vias are kept; a result that is worse than before is reverted; the new tracks are then polished (polish=false skips that). Can take minutes on dense boards. 2 layers: pcb_route(ignore_nets=["GND"]) then pcb_pour(net="GND", stitch=true). 4 layers: pour the inner planes first. tracks=[{"from":"U1.3","to":"C3.1","width":0.3,"layer":"F.Cu","waypoints":[[x,y]]}]: explicit connections; refuses to join different nets or to cross other nets' copper. pcb_route_guided is the built-in deterministic router (no download); board_build() picks for you. Examples: pcb_route() · pcb_route(tracks=[{"from":"J1.1","to":"U1.3","width":0.5}])
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"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| nets | No | mode='polish': only these nets | |
| finish | No | Hand what Freerouting leaves to the guided router (default true) | |
| passes | No | Freerouting max passes (default 30) | |
| polish | No | Tidy the new tracks and unreadable references afterwards (default true) | |
| render | No | attach a PNG (default false) | |
| tracks | No | ||
| project | No | project path (default: active) | |
| timeout | No | Seconds before the router is stopped (default 600, whole call) | |
| keep_worse | No | Keep the routed result even if it adds DRC errors without reducing unrouted connections (default false: restore) | |
| while_open | No | refuse (default) | revert | |
| ignore_nets | No | Nets the autorouter must skip | |
| signal_layers | No | Copper layers the autorouter may put traces on (default: all but plane layers; outer layers only on a 4-layer board) | |
| clear_existing | No | Delete existing tracks/vias before autorouting |