Skip to main content
Glama

Autoroute (built-in router)

pcb_autoroute

Routes remaining small signal nets on a 2-layer PCB with exact clearances, 45° tracks, vias, and rip-up retry; leaves ground nets for pours by default and reports failures.

Instructions

OPTIONAL helper — route power and critical nets by hand first (pcb_tracks, pcb_copper), then use this for the remaining small signal nets. Built-in 2-layer maze router (exact clearances, 45° segments, vias, rip-up & retry). Ground nets are skipped by default — connect them with GND pours on top & bottom (pcb_pour) — unless routeGround=true. Power nets get powerTrack width. Options: nets (route only these), skipNets, replace (rip existing routing of those nets first). All sizes in mm. Reports routed / failed connections. If some fail: move parts apart (pcb_place), allow more vias, or reduce track/clearance, then run again.

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_autoroute"
  }
}

Input Schema

NameRequiredDescriptionDefault
gridNorouter grid in mm (auto)
netsNo
trackNo
dryRunNo
layersNo
replaceNo
viaCostNo
viaHoleNo
skipNetsNo
clearanceNo
netWidthsNo
powerTrackNo
timeLimitSNo
routeGroundNoground nets are normally left to GND pours/planes (pcb_pour) — set true to route them as tracks
viaDiameterNo
edgeClearanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does most of it: exact clearances, 45° segments, vias, rip-up & retry, default ground-net skipping, power-net width behavior, and reported routed/failed counts. Gaps remain — it does not state whether the board state is persisted, whether replace=true destructively removes existing routing (implying irreversible changes), or the default 90s runtime budget — but the behavioral core is well covered.

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 purpose, then options, then failure recovery — a sensible order, and every sentence contributes (even the terse 'All sizes in mm'). It is dense and slightly comma-heavy ('exact clearances, 45° segments, vias, rip-up & retry'), but for a 16-parameter tool the length is justified.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 16 optional parameters, no annotations, no output schema, and 13% schema coverage, the definition explains what the tool does and how to recover from failures but leaves the agent guessing on many tunables and on whether the run mutates or saves board state. Adequate to invoke safely in broad strokes, not complete.

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 only 13% across 16 parameters, so the description must compensate and it only partially does: it explains nets, skipNets, replace, routeGround, powerTrack, and the interaction of track/clearance. Many parameters — dryRun, layers, viaCost, viaHole, viaDiameter, netWidths, timeLimitS, edgeClearance, grid — receive no meaning anywhere. The 'All sizes in mm' line adds a useful global unit rule, but half the surface stays opaque.

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?

Names a specific verb and resource — 'built-in 2-layer maze router' that routes 'remaining small signal nets' — and immediately positions itself against manual routing (pcb_tracks, pcb_copper) and ground handling (pcb_pour). An agent can distinguish it from every listed sibling without opening the 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 explicit sequencing (route power and critical nets by hand first, then autoroute the rest), an explicit exclusion (ground nets are skipped by default unless routeGround=true, use pcb_pour instead), and concrete remediation steps if connections fail (move parts with pcb_place, allow more vias, reduce track/clearance, rerun). This is close to ideal when-and-when-not guidance.

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