Skip to main content
Glama

Clean up tracks and vias

cleanup_board
Destructive

Sweep the routing: zero-length and duplicate tracks, stub tracks (a free end, and everything the track touches stays joined without it), and vias that meet their net on fewer than two layers. Contact is copper overlap, as KiCad judges it. Refills the zones first so pours count as connections. Locked items stay. The board is put back if the unconnected count or the DRC errors rise. A track running on past its last junction is cut back to it (trim_overhangs). list_removed names every item that went.

Input Schema

NameRequiredDescriptionDefault
refillNo
wait_sNoSeconds 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).
design_idYesThe design id returned by import_kicad_project or list_designs.
list_removedNo
trim_overhangsNo
dangling_tracksNo
duplicate_tracksNo
unconnected_viasNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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)."
  2. 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)."
  3. First observed

TDQS

A3.8/5.0
Behavior5/5

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

Goes well beyond the destructiveHint=true annotation: it discloses that zones are refilled first so pours count as connections, that locked items are preserved, that the board is rolled back if the unconnected count or DRC errors rise, and how overhangs are trimmed. The definition of 'contact' (copper overlap as KiCad judges it) is exactly the kind of domain-specific behavioral detail an agent cannot infer.

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 the removal targets, then the safety and reporting behavior, with no filler sentences. Some parentheticals ('a free end, and everything the track touches stays joined without it') are dense but carry real meaning; nothing is redundant.

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 destructive 8-parameter mutation with no output schema and no annotations beyond safety hints, the description covers the critical gaps: what gets deleted, what is exempt (locked items), rollback conditions, and what list_removed reports. Only minor items are unaddressed, such as the default state of the category flags and the long-running job follow-up (partly handled by the wait_s schema text).

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 only 25%, so the description must compensate, and it largely does: it ties the three category booleans to their targets (duplicates, dangling/stub tracks, under-connected vias) and explains trim_overhangs, list_removed, and the implicit refill flag. It does not state that these are independent on/off selectors or their defaults, leaving some semantics to inference.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific action (sweep the routing) and enumerates exactly which items are removed: zero-length/duplicate tracks, stub tracks, and vias touching their net on fewer than two layers. This is precise enough to distinguish it from pruning/polishing tools, though no sibling is named to make the contrast explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance and no named alternative, even though the sibling list contains obvious near-neighbors (prune_vias, polish_vias, tidy_copper, repair_board, ripup_routing). The text describes what the sweep does and how it behaves, not the conditions under which an agent should pick it over those tools.

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