Skip to main content
Glama

Route the board

route_board

Route under the project's rules and net classes. By default (no nets, no router, none of the single-route options below) it runs the full route pipeline Koppar benchmarks: the learned router on the whole board, repair rounds on what stays open, copper finishing (0/45/90 runs) and one repair round after it, inside one wall-clock cap: time_budget_s is that cap (default 1200, up to 1500), so the job runs up to about 20 minutes: follow it with get_board_job. The result gives the final unconnected items and DRC errors and a pipeline summary: the counts after the route and after each finish, whether the copper finishing was kept. preserve_existing unset keeps the copper of a board that has tracks or vias and routes a board without any from scratch; false routes every net again. pours, ml_options, pairs_first and class_vias shape the route and the repair rounds of that pipeline. nets, router, seed_existing or a rule override (clearance_mm, track_width_mm, via sizes, edge_clearance_mm: this run only, so not the pipeline, whose later stages hold the project rules) runs ONE route instead, with no copper finishing, for expert control (tidy_copper after it straightens the copper): nets limits it to those nets; preserve_existing (default true) keeps every track and via already on the board and routes only what is still open. pours: "keep" (the default on a board you brought) keeps the board's zones, and a zone of a net the route lays is that net's plane: each of its pads gets a via to it and the net is not routed as tracks (zones first, then route); "engine" drops them and lets the router plan its own planes. Rule overrides apply to this run only. The learned router takes its via discipline in ml_options. A single route takes time_budget_s (default 120, up to 900).

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": "route_board"
  }
}

Input Schema

NameRequiredDescriptionDefault
netsNoNet names; * and ? wildcards, e.g. ["USB_D*", "+3V3"].
poursNo
routerNoUnset: the full pipeline (above) on the whole board, "ml" for nets. "ml": the learned router service alone, 1 to 8 layers; the time budget is its deadline. Nets outside the nets scope, and with preserve_existing the nets their copper already connects, keep that copper and everything else is routed around it (partial copper of a routed net is replaced).
wait_sNoSeconds to wait (default 55); a job still running comes back "running" for get_board_job.
compactNotrue: the densest via the rules allow (0.4/0.2), which JLCPCB prices with a mandatory 4-wire Kelvin test (~$40 per order); false: never below the Kelvin-free 0.45/0.2. Unset: compact only on a board with an area-array package or vias in pads.
design_idYesThe design id returned by import_kicad_project or list_designs.
class_viasNoRoute with the Default class's via. Without it (and without via_diameter_mm) a route uses the board's smallest legal via where the class's is larger.
ml_optionsNoFields passed to the learned router service as they are (router "ml"): via_cost and via_cost_hi (prices in lattice cells; a move costs 1 and the served default via is 8, 12 while a net is on the quality ladder), ql_release (rejected rip trades before a net drops to via_cost, 0 never), endgame_release (false keeps failing nets at via_cost_hi), economy_via_mm (a via counts as this many mm in the economy pass, default 2), guide_via_w (per-cell via price from the model's via channel), plane_cost (signal copper on a poured layer, per cell), pair_w, guide_w, ripup, seed_offset, via_economy_victims (default 4; 8 trades harder), first_nets (globs routed before everything else: buses that span several connectors), draws (client-side: route this many seeded draws and keep the one that connects most then uses fewest vias; the tie-breaks alone move a 500-via board by about 8 vias), stitch_poured (false: no stitch via for a pad already on a layer poured with its net, GND pads on F/B), stitch_cluster_mm (join same-layer pads of a poured net within this reach by short traces and via once per cluster; 4 wins, 8 loses), stitch_cluster_nets (globs: which poured nets cluster), draw_open_penalty (client-side: vias an open net costs when draws are compared, default 0 = the most-connected draw always wins), layer_cost (per-cell price on named layers, {"F.Cu": 2}: the pour polish prices every layer but the plane's).
pairs_firstNoRoute the differential pairs (USB D+/D-, CAN H/L, X_P/X_N) alone first, then everything else around them: a port pad row only lets a pair out before the neighbours take its lane.
clearance_mmNo
via_drill_mmNo
vias_in_padsNo'forbid' (default): no via inside an SMD pad under 2 mm. 'allow': vias may sit in pin pads, for a board ordered with filled and capped vias (JLCPCB POFV); dense connector rows close that otherwise stay open.
seed_existingNoML router: the connected nets in scope are sent as their own routes (seed_copper) and the service reworks the finished board with its rip-up and via-economy passes; kept only when KiCad counts fewer vias. Scope nets to the routed signal nets (pour nets stay).
time_budget_sNoThe full pipeline's wall-clock cap (default 1200), or a single route's budget (default 120, up to 900).
track_width_mmNo
via_diameter_mmNo
edge_clearance_mmNo
preserve_existingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 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}$"
    • changedInput schema / properties / ml_options / additionalProperties / anyOf
      Previous value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "items": {
      -      "maxLength": 80,
      -      "type": "string"
      -    },
      -    "maxItems": 64,
      -    "type": "array"
      -  },
      -  {
      -    "additionalProperties": {
      -      "type": "number"
      -    },
      -    "propertyNames": {
      -      "type": "string"
      -    },
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "additionalProperties": {
      +      "type": "number"
      +    },
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / ml_options / propertyNames
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / nets / items / maxLength
      Removed value: -200
    • removedInput schema / properties / nets / items / minLength
      Removed value: -1
    • removedInput schema / properties / nets / 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. Changed6 schema fields changed
    • removedInput schema / properties / fewest_vias
      Removed value: -{
      -  "description": "Router \"negotiated\": the fine-grid router alone with its via phase (every net rerouted at 3x the via price and settled again): fewer vias, 2-3x the time.",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / grid_mm
      Removed value: -{
      -  "maximum": 0.5,
      -  "minimum": 0.025,
      -  "type": "number"
      -}
    • removedInput schema / properties / negotiation_rounds
      Removed value: -{
      -  "maximum": 6,
      -  "minimum": 1,
      -  "type": "integer"
      -}
    • changedInput schema / properties / router / description
      Previous value: -"Unset: the full pipeline (above) on the whole board, \"ml\" for nets. \"ml\": the learned router service alone, 1 to 8 layers; the time budget is its deadline. Nets outside the nets scope, and with preserve_existing the nets their copper already connects, keep that copper and everything else is routed around it (partial copper of a routed net is replaced). \"ts\": the local router, also the fallback when the service fails; pours/via_cost/grid_mm/negotiation_rounds apply to it only. \"negotiated\": PathFinder over every net at once, gridless on a coarse routing graph, the fine grid for the last open nets (the whole board from scratch, nets must be unset; GND routed as a net under its pour, then pruned). Minutes (its budget is 1800 s unless time_budget_s is given) but it closes dense boards the service leaves open. Follow with tidy_copper."New value: +"Unset: the full pipeline (above) on the whole board, \"ml\" for nets. \"ml\": the learned router service alone, 1 to 8 layers; the time budget is its deadline. Nets outside the nets scope, and with preserve_existing the nets their copper already connects, keep that copper and everything else is routed around it (partial copper of a routed net is replaced)."
    • changedInput schema / properties / router / enum
      Previous value: -[
      -  "ts",
      -  "ml",
      -  "negotiated"
      -]New value: +[
      +  "ml"
      +]
    • removedInput schema / properties / via_cost
      Removed value: -{
      -  "maximum": 50,
      -  "minimum": 0,
      -  "type": "number"
      -}
  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. 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)."
  4. Changed1 schema field changed
    • addedInput schema / properties / compact
      Added value: +{
      +  "description": "true: the densest via the rules allow (0.4/0.2), which JLCPCB prices with a mandatory 4-wire Kelvin test (~$40 per order); false: never below the Kelvin-free 0.45/0.2. Unset: compact only on a board with an area-array package or vias in pads.",
      +  "type": "boolean"
      +}
  5. 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)."
  6. Changed3 schema fields changed
    • changedInput schema / properties / router / description
      Previous value: -"\"ml\" (default): the learned router service, 1 to 8 layers; the time budget is its deadline. Nets outside the nets scope, and with preserve_existing the nets their copper already connects, keep that copper and everything else is routed around it (partial copper of a routed net is replaced). \"ts\": the local router, also the fallback when the service fails; pours/via_cost/grid_mm/negotiation_rounds apply to it only. \"negotiated\": PathFinder over every net at once, gridless on a coarse routing graph, the fine grid for the last open nets (the whole board from scratch, nets must be unset; GND routed as a net under its pour, then pruned). Minutes (its budget is 1800 s unless time_budget_s is given) but it closes dense boards the service leaves open. Follow with tidy_copper."New value: +"Unset: the full pipeline (above) on the whole board, \"ml\" for nets. \"ml\": the learned router service alone, 1 to 8 layers; the time budget is its deadline. Nets outside the nets scope, and with preserve_existing the nets their copper already connects, keep that copper and everything else is routed around it (partial copper of a routed net is replaced). \"ts\": the local router, also the fallback when the service fails; pours/via_cost/grid_mm/negotiation_rounds apply to it only. \"negotiated\": PathFinder over every net at once, gridless on a coarse routing graph, the fine grid for the last open nets (the whole board from scratch, nets must be unset; GND routed as a net under its pour, then pruned). Minutes (its budget is 1800 s unless time_budget_s is given) but it closes dense boards the service leaves open. Follow with tidy_copper."
    • addedInput schema / properties / time_budget_s / description
      Added value: +"The full pipeline's wall-clock cap (default 1200), or a single route's budget (default 120, up to 900)."
    • changedInput schema / properties / time_budget_s / maximum
      Previous value: -900New value: +1500
  7. First observed

TDQS

A4.1/5.0
Behavior4/5

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

With only readOnly/destructive/openWorld annotations, the description carries most of the burden and does so well: it discloses the wall-clock cap and 20-minute ceiling, the async job pattern, that rule overrides apply to this run only and not to pipeline stages, and that pours='engine' drops zones and preserve_existing=false reroutes every net. It does not spell out exactly what the returned result looks like beyond field names, keeping it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One dense block of prose with nested parentheses and no headings or bullets; the mode split, the pipeline behaviour and the ml_options tutorial all run together. Most sentences carry information, but the size and lack of front-loaded structure make the definition hard to scan.

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 an 18-parameter tool with a nested object and no output schema, the description covers both execution modes, the async follow-up, cost implications (Kelvin test pricing) and the shape of the returned result. Remaining gaps are minor, mainly unspecified prerequisites such as whether a board must be started first.

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?

At 61% schema coverage the description meaningfully compensates: it explains mode-selection parameters, the semantics of pours keep/engine (zones become planes with pad vias), pairs_first, class_vias, seed_existing and the run-scoped rule overrides. The long ml_options narration adds real meaning beyond the schema's pass-through description, though a few parameters (wait_s, vias_in_pads, compact) are left entirely to the schema.

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 ('Route under the project's rules and net classes') and then sharply separates two operating modes: the default full pipeline vs. a single route triggered by nets/router/seed_existing/rule overrides. An agent can tell exactly what the tool does and which mode it will get 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit about the default path, the conditions that switch to a single expert route, following up with get_board_job, and running tidy_copper afterwards. It lacks exclusion guidance against adjacent siblings such as repair_board or finish_board, so it stops short of full alternative routing.

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