Skip to main content
Glama

pcb_check_placement_collision

Test a proposed component placement (x, y, rotation) for bounding-box overlap with other placed parts on the same board side before moving it.

Instructions

Dry-run check whether moving a component to (x, y[, rotation]) would overlap any other placed component on the same side.

DOES NOT actually move the component. Computes the predicted axis-aligned bounding box at the proposed pose, then AABB-tests against every other component's current bounding rect. Use this BEFORE every pcb_move_components call when placing parts on a board that already has placed parts.

Args: designator: Component to test (must exist on the board). x: Proposed X position in mils (component reference point). y: Proposed Y position in mils. rotation: Proposed rotation in degrees. When None the target's current rotation is used. Quarter-turn deltas (~+/-90 from current) swap the AABB dimensions; other angles use the current-orientation bbox as an approximation. margin_mils: Extra clearance to require around the target. Default 0 (touching bounding boxes count as collision).

Returns: Dict with: - designator: target. - proposed: {x, y, rotation, bbox:{x1,y1,x2,y2}, margin_mils}. - clear: True if no collisions, False otherwise. - colliding_count: number of collisions. - colliding: list of {designator, bbox:{...}} per collider.

Caveats: - AABB only; rotated non-square footprints will report an inflated bbox. - Same-side check is automatic; the target's bbox is compared only against components on the same layer (Top vs Bottom). - Does not detect courtyard violations or pad-to-pad clearances, only solid-box overlap. Use DRC for actual clearance rules.

Input Schema

NameRequiredDescriptionDefault
xYes
yYes
rotationNo
designatorYes
margin_milsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.9/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 it does: it discloses the read-only dry-run nature, the exact algorithm (predicted AABB vs. every other component's current bbox), the same-side-only comparison rule, the rotation-swap approximation, and three concrete limitations (inflated bbox for rotated non-square parts, no courtyard/pad-to-pad clearance). It also fully specifies the return payload even though an output schema exists.

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 one-line purpose and the critical negative claim, then structured Args/Returns/Caveats. Every caveat earns its place, but the Returns block restates what the existing output schema already provides, so it is slightly longer than strictly necessary.

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 5-parameter check tool with no annotations, the definition covers trigger conditions, algorithm, unit conventions, defaults, approximate cases, and explicit non-goals. Nothing an agent needs in order to call it correctly and interpret the result is 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 coverage is 0%, so the description must compensate, and it does for all five parameters: units (mils), reference point, the None-means-keep-current-rotation default, the quarter-turn AABB swap behavior, and margin_mils default with the semantic that touching boxes count as collision. This adds real meaning beyond the bare typed properties.

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+resource (dry-run collision check of a proposed placement) and immediately delimits scope: "DOES NOT actually move the component." It explicitly distinguishes itself from the mutation sibling pcb_move_components, so an agent can route correctly without opening a schema.

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

Usage Guidelines5/5

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

Gives an explicit trigger — "Use this BEFORE every `pcb_move_components` call when placing parts on a board that already has placed parts" — and an explicit when-not in the caveats: use DRC for real clearance/courtyard rules. Both the alternative and the condition selecting it are named.

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