Skip to main content
Glama

Koppar

Fewer vias, net by net

polish_vias
Destructive

After route_board and prune_vias: rip one net at a time, most vias first, route it alone around everything else at a high via price, and keep the new copper only when KiCad counts fewer vias with no new open item or DRC error (a reroute that cuts a pour into islands first gets one via per island, bridge_islands). Run run_drc and get_score afterwards; a second pass sometimes finds more.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
netsNoNet names; * and ? wildcards, e.g. ["USB_D*", "+3V3"].
pairsNoRip and reroute a differential pair (_H/_L, _P/_N, +/-) together (default true: a leg rerouted alone comes back at its own length; a step that degrades a pair is never kept).
poursNoAlso polish the poured nets (default false): the pour and its stitch vias stay, the net is routed as a track tree on top, then its redundant stitch vias are pruned. A lottery: the tree that did this by accident (PCBGolf +3V3 53 -> 32) did not repeat in 2 deliberate tries.
routerNo
wait_sNoSeconds to wait for the job (default 55). A job still running comes back with status "running": follow it with get_board_job.
workersNoprune workers for a poured net (default 4).
max_netsNoNets to try, most vias first (default 40).
min_viasNoOnly nets with at least this many vias (default 2).
via_costNoVia price for the lone reroute (default 60).
design_idYesThe design id returned by import_kicad_project or list_designs.
ml_optionsNo
time_budget_sNoRouter budget per net (default 120).
bridge_islandsNo
total_budget_sNoStop starting nets after this (default 1800).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With destructiveHint=true already declared, the description still adds real behavioral value: the keep-only-if-fewer-vias rule, the no-new-open-item/no-DRC-error gate, the island-bridging special case, and the honest non-determinism note on pours. It does not cover runtime/rate behavior or what happens on a partially applied run, so it is strong but not exhaustive.

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?

One dense paragraph that front-loads the workflow and keeps every clause earning its place; the parenthetical island note and the closing follow-up sentence are the only slightly crowded parts. Efficient despite covering a lot of ground.

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-param destructive mutation with a nested ml_options object and no output schema, the description supplies the essential workflow, safety gate, and follow-up calls. The gaps are limited to a handful of tuning parameters already documented in the schema.

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 coverage is 79% with 14 params, so most semantics live in the schema. The description adds conceptual meaning for via_cost ('high via price') and bridge_islands (one via per island) but says nothing about nets, pairs, router, wait_s, or the budget parameters, so it only marginally exceeds baseline.

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 (polish), resource (vias), and scope (net by net, fewest vias first), and the description makes clear it is a rip-reroute-keep loop rather than a plain router or prune. An agent can distinguish it from route_board, prune_vias, and ripup_routing without opening a 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?

States the prerequisites explicitly (after route_board and prune_vias) and the follow-ups (run_drc, get_score), plus notes a second pass sometimes finds more. The ordering and when-to-run context are fully spelled out rather than inferred.

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