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

TDQS

A4/5.0
Behavior5/5

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

With destructiveHint already declaring the risk, the description adds substantial context: exactly which item classes are removed, the definition of a stub, that contact is copper overlap 'as KiCad judges it', that zones are refilled first, that locked items are preserved, and a rollback guarantee if unconnected count or DRC errors rise. This goes well beyond annotation coverage.

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 'Sweep the routing:' and each sentence earns its place by adding a distinct behavioral fact. It is dense and parenthetical, which slightly hurts readability, but there is no filler.

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, output-schemaless tool, the description is nearly complete: it covers what is destroyed, the safety rollback, locked-item preservation, and part of the return (list_removed). It could say more about the overall response shape, but no critical calling information is missing.

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 description coverage is low (25%), and the description compensates by explaining the flags semantically: trim_overhangs is named with its meaning, list_removed 'names every item that went', refill is tied to the zone refill, and the stub/dangling/via flags map to the described removal categories. It leaves some flags (dangling_tracks, duplicate_tracks, unconnected_vias) to inference but adds real value over the bare schema.

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 verb (sweep) and precisely enumerates the resources it touches: zero-length tracks, duplicate tracks, stub tracks, and vias meeting their net on fewer than two layers. However, it never differentiates itself from close siblings like prune_vias, polish_vias, or tidy_copper, so the agent must infer which cleanup tool applies.

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?

Usage is implied (a post-routing sweep that refills zones and guards on unconnected/DRC counts) rather than stated. There is no explicit 'use this when' or routing to an alternative such as prune_vias or tidy_copper, so the boundary between the several cleanup tools remains ambiguous.

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