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

TableJSON 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.
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. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the destructiveHint annotation by disclosing the safety net: the board is rolled back if unconnected count or DRC errors rise, locked items are preserved, zones are refilled first so pours count, and contact is defined as KiCad copper overlap. This is exactly the behavioral context an agent needs before invoking a destructive mutation.

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 cleanup targets and dense with useful content; each sentence earns its place. It is a single dense block rather than cleanly structured, but there is little waste.

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?

No output schema exists, and the description covers the safety rollback, preservation rules, and what list_removed reports. It omits the source of design_id and the default return of a normal run, but is otherwise complete for a destructive multi-flag mutation.

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?

With only 25% schema coverage, the description carries real weight: it explains what trim_overhangs does, that list_removed names removed items, that refill triggers zone refilling, and its prose maps to the dangling_tracks/duplicate_tracks/unconnected_vias toggles. It stops short of directly naming those three boolean flags, so it does not fully compensate for the coverage gap.

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 (sweep/clean) and resource (routing) and enumerates exactly what is removed: zero-length and duplicate tracks, stub tracks, and vias meeting their net on fewer than two layers. An agent can distinguish this from sibling cleanup tools 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 Guidelines3/5

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

The description covers what the tool does in depth but never states when to reach for it over overlapping siblings like prune_vias, tidy_copper, repair_board, or ripup_routing. Usage is implied by the cleanup semantics rather than routed explicitly.

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