Skip to main content
Glama

design_audit_schematic

Audit the active schematic for component overlaps, wire crossings, and stacked ports, returning geometry so layout issues can be fixed before ERC validation.

Instructions

Structured visual/layout audit of the active schematic.

Call AFTER design_execute_plan and BEFORE design_validate so layout problems are fixed first; ERC violations downstream are less noisy. Detects three classes of issue, each with enough geometry for the planner to compute a corrective move:

  • overlaps - pairs of components whose bboxes intersect

  • wire_crossings - wire segments that cross a component body (excluding pin-to-pin connections)

  • stacked_ports - 3+ power/ground glyphs of the same net huddled inside cluster_radius_mils

Args: project_path: Optional .PrjPcb path. None uses the focused project. cluster_radius_mils: Radius for stacked-port clustering. Default 600 mils.

Returns: SchematicAuditReport dict: {ok, project_path, overlaps[], wire_crossings[], stacked_ports[], notes[]}. ok=True iff every list is empty.

Input Schema

NameRequiredDescriptionDefault
project_pathNo
cluster_radius_milsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses the three detection classes with the geometric rule for each (bbox intersection, wire over component body excluding pin-to-pin, 3+ same-net power glyphs inside cluster_radius_mils) and the ok=True semantics. It stops short of stating explicitly that it is non-mutating and whether a project must be compiled/focused first.

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 purpose and ordering rule, then bulleted detection classes, then Args/Returns. Every sentence earns its place functionally, though the Returns block restates an output schema that already exists and could be trimmed.

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 two-parameter, non-mutating audit tool with an output schema, nothing an agent needs is missing: ordering, detection semantics, defaults, fallback behavior for the focused project, and the success condition. The explicit Returns section is extra, not a gap-filler.

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: project_path is documented as optional .PrjPcb with None meaning the focused project, and cluster_radius_mils as the stacked-port clustering radius with a stated default of 600 mils. Both parameters gain meaning beyond the bare schema types.

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 and resource ('Structured visual/layout audit of the active schematic') and then enumerates exactly what it detects: overlaps, wire_crossings, stacked_ports. An agent can distinguish this from design_validate or audit_find_* siblings 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 Guidelines5/5

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

Gives an explicit ordering constraint — call AFTER design_execute_plan and BEFORE design_validate — and explains why (downstream ERC violations are less noisy when layout is fixed first). That is real when-to-use guidance, not just context.

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