Skip to main content
Glama

pcb_place_stitching_vias

Places a grid of stitching vias on a specified net within a rectangle to create low-inductance return paths; defaults to a dry run and skips conflicting primitives.

Instructions

Place a grid of stitching vias on a named net within a rectangle.

Standard RF / EMC tool: place GND stitch vias around high-speed traces so the return current has a low-inductance path between reference planes. Also used near connectors / clock generators / EMI-sensitive areas.

Algorithm: walk a regular grid inside the rectangle; for each gridpoint, spatial-iterate within via_size_mils/2 + clearance_mils. Skip the gridpoint if any non-same-net primitive (pad / via / track / arc) is in range. Otherwise create a top→bottom through-via on the target net.

The default is dry-run because mutating a board with N×M new vias is risky. Confirm the placed / skipped count looks right, then call again with dry_run=False.

Args: net: Target net (must already exist on the board). x1_mils, y1_mils, x2_mils, y2_mils: Inclusive rectangle where the grid is placed. PCB origin is bottom-left by Altium convention. spacing_mils: Grid spacing (default 50). For GND stitching near a high-speed bus, /4 of the wavelength of the highest harmonic is a common rule of thumb. via_size_mils: Via pad diameter (default 30). via_hole_mils: Via drill diameter (default 14). clearance_mils: Min gap to any non-same-net existing primitive (default 10). dry_run: When True (default), only count would-be placements without mutating the board.

Returns: Dict with {net, dry_run, placed, skipped, spacing_mils, clearance_mils}.

Input Schema

NameRequiredDescriptionDefault
netYes
dry_runNo
x1_milsYes
x2_milsYes
y1_milsYes
y2_milsYes
spacing_milsNo
via_hole_milsNo
via_size_milsNo
clearance_milsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.5/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does so: it discloses the default dry-run safety posture and why (N×M via mutation is risky), the exact skip rule (non-same-net pad/via/track/arc within via_size/2 + clearance), that it creates top→bottom through-vias, and that the target net must already exist on the board.

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 a one-line summary, then rationale, algorithm, a bolded safety note, and conventional Args/Returns sections — easy to scan. Slightly long; the RF rationale paragraph is useful but could be tighter.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter mutating board tool with no annotations, the description covers purpose, risk, algorithm, every argument, and the return dict's keys (net, dry_run, placed, skipped, spacing_mils, clearance_mils). Nothing an agent needs to call it safely and correctly appears to be missing.

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 description coverage is 0%, and the description fully compensates: all ten parameters are explained with units, defaults, and semantics (inclusive rectangle, bottom-left origin per Altium convention, spacing rule of thumb of λ/4 of the highest harmonic, clearance measured against any non-same-net primitive). This is meaning the schema titles alone would never convey.

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 (place), resource (stitching vias), and scope (grid on a named net inside a rectangle), and the algorithm paragraph makes the spatial-clearance behavior concrete. It never names the closely related siblings pcb_place_via_array / pcb_place_vias, so an agent must infer the difference from behavior rather than from an explicit contrast.

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?

Gives concrete when-to-use context (RF/EMC return-path stitching around high-speed traces, near connectors, clock generators, EMI-sensitive areas) and a strong operating protocol (dry-run first, inspect placed/skipped, then re-call with dry_run=False). No explicit 'do not use for X, use tool Y instead' routing against the other via-placement tools.

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