Skip to main content
Glama

pcb_cleanup_tracks

Deletes tiny stray track stubs and merges collinear, same-net segments on a PCB. Runs sliver cleanup, safe collinear merging, or both to tidy routed copper without breaking connectivity.

Instructions

Tidy stray track geometry: delete slivers and/or merge collinear runs.

Modes:

  • "slivers" (default): delete every track shorter than min_length_mils. Catches the zero/near-zero stubs left behind by editing.

  • "merge": join two collinear, same-layer, same-width, same-net tracks that meet end to end into a single track. The merge only fires when the shared point is a clean degree-2 junction (exactly those two track ends, with no via, pad, arc, or third track present), so it is safe to run on routed copper without breaking connectivity.

  • "both": slivers pass, then merge pass.

Args: mode: "slivers", "merge", or "both" (default "slivers"). min_length_mils: Sliver threshold (default 1).

Returns: {"slivers_deleted", "merged", "mode"}.

Input Schema

NameRequiredDescriptionDefault
modeNoslivers
min_length_milsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that slivers mode permanently deletes geometry below a threshold, and it spells out the exact preconditions under which merge fires (degree-2 junction, no via/pad/arc/third track) and claims it is 'safe to run on routed copper without breaking connectivity'. It stops short of stating undo/reversibility or whether an open board must be active.

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 one-line summary, then a mode block, then args, then returns — a clean hierarchy. The trailing Args/Returns sections partially restate schema and output schema, which costs a little, but nothing is padded or vague.

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?

A destructive cleanup mutation with no annotations and only two loosely typed params is well covered: modes, thresholds, safety preconditions and the returned triple (slivers_deleted, merged, mode) are all explained. The remaining gap is operational context — permissions, whether a board must be focused, and undo behavior — which an agent would still want before calling a delete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate and does: the allowed values and default for mode ('slivers', 'merge', 'both', default 'slivers') and the meaning, unit and default of min_length_mils ('Sliver threshold (default 1)') are all stated, which is more than the bare schema types give.

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?

Opens with a specific verb+resource+outcome ('Tidy stray track geometry: delete slivers and/or merge collinear runs') and immediately enumerates the two distinct operations. An agent can tell without opening the schema which of its many PCB siblings (pcb_delete_invalid_objects, pcb_trim_extend_track, pcb_normalize_vias) this one is not.

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?

Each mode is given a clear when-to-use condition: slivers 'catches the zero/near-zero stubs left behind by editing', merge applies to collinear same-layer/same-width/same-net pairs, and 'both' runs them in order. It never names a sibling tool or a when-not-to-use case (e.g. use pcb_delete_invalid_objects instead), so routing is implied rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools