Skip to main content
Glama
Copper

Copper

Route (Freerouting / explicit)

pcb_route
Destructive

Automatically 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

NameRequiredDescriptionDefault
modeNo
netsNomode='polish': only these nets
finishNoHand what Freerouting leaves to the guided router (default true)
passesNoFreerouting max passes (default 30)
polishNoTidy the new tracks and unreadable references afterwards (default true)
renderNoattach a PNG (default false)
tracksNo
projectNoproject path (default: active)
timeoutNoSeconds before the router is stopped (default 600, whole call)
keep_worseNoKeep the routed result even if it adds DRC errors without reducing unrouted connections (default false: restore)
while_openNorefuse (default) | revert
ignore_netsNoNets the autorouter must skip
signal_layersNoCopper layers the autorouter may put traces on (default: all but plane layers; outer layers only on a 4-layer board)
clear_existingNoDelete existing tracks/vias before autorouting

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only flag destructiveHint/openWorldHint; the description adds far more: first-use download of Java and the router into $COPPER_HOME/tools, existing tracks/vias preserved, worse results reverted, post-route polish, multi-minute runtime on dense boards, refusal to join different nets or cross other nets' copper. These are exactly the side-effect and cost facts an agent needs before committing a destructive call.

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-loads the primary autoroute behavior, then layers workflow recipes, explicit-tracks semantics, and the guided-router alternative in a sensible order. It is dense and a bit sprawling across many short sentences, and the trailing "Examples: pcb_route() ..." line largely restates what precedes it, but almost every sentence carries usable information.

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 14-parameter destructive mutation with no output schema, the description covers workflow, engine choice, side effects, revert policy, and runtime cost. The notable gap is what the call reports back (e.g., unrouted count, DRC deltas, the optional PNG), which an agent must discover by invoking it.

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 already 86%, so many parameters are self-documenting; the description still adds real meaning for mode='auto' defaults, polish=false skipping polish, and the tracks= object shape (from/to/width/layer/waypoints) that the schema leaves as a bare object. It says nothing about finish, passes, while_open, clear_existing, or timeout beyond what the schema provides.

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?

Opens with a specific verb+resource ("Route the board") and immediately names the engine (Freerouting) and the mode semantics, then explicitly distinguishes itself from pcb_route_guided ("the built-in deterministic router (no download)"). An agent can tell the two routers apart 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 concrete when-to-use routing: mode='auto' is the default when no tracks are supplied, 2-layer flow is pcb_route(ignore_nets=["GND"]) then pcb_pour(net="GND", stitch=true), 4-layer is pour inner planes first. It names the alternative (pcb_route_guided) and the meta-choice (board_build() picks for you), and explains when to use the explicit tracks= form.

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