Skip to main content
Glama

pcb_layout_audit

Audit a PCB layout against exit gates for placement, connectivity, clearance DRC, corners, return vias, and plane islands, returning pass/fail counts and itemised findings with coordinates.

Instructions

Measure a board for the layout stages' exit gates. Changes nothing.

Reads the focused board exactly, the way pcb_autoroute does (pcb.get_layout_model), or a saved LayoutBoard JSON, and runs the in-house checks over it. Every check returns counts and itemised findings with coordinates in mils:

  • placement_audit: overlapping bodies on one side, pads of different nets closer than the clearance rule, parts on keepouts or mounting holes, parts off the board.

  • connectivity_summary: nets routed / partly routed / not started, and every unreached pad.

  • drc: the exact clearance check.

  • corner_audit: track junctions bending sharper than 45 degrees.

  • return_via_audit: signal vias with no ground or plane via within max_distance_mils.

  • plane_region_audit: pour and plane copper broken into islands.

Log the result as data on the stage_result (design_session_log); design_next_action checks the numbers against the stage's gate.

Args: checks: names from the list above; None runs them all. expect_file: full path of the focused board, for a live read. The read refuses on the first reply if another board is focused. board_json_path: a saved LayoutBoard (.json or .json.gz) to audit offline instead; nothing is read from the editor. nets: the signal nets return_via_audit checks. None checks differential-pair and high-speed-class nets, or every signal via when the board names neither. max_distance_mils: how near a return via must be (centre to centre). Default 40. limit: findings listed per kind; counts are never cut.

Returns: {"board", "pass", "summary": {check: {pass, counts...}}, "checks": {check: full result}, "source": "live"|"file"}, or {"error": ...}.

Input Schema

NameRequiredDescriptionDefault
netsNo
limitNo
checksNo
expect_fileNo
board_json_pathNo
max_distance_milsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so well: it says the tool changes nothing, reads the focused board or a saved file, refuses the live read if another board is focused, and explains that `limit` truncates findings but never counts. It also specifies coordinate units in mils.

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?

The description is well front-loaded with purpose and source modes, then uses structured bullets for the six checks and a clean Args/Returns layout. It is somewhat long, but the length is justified by the six checks and six otherwise-undocumented parameters, so very little is wasted.

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 complex read-only audit tool with six parameters, no annotations, zero schema descriptions, and an output schema, the description supplies the missing operational context. It covers check meanings, source selection, return shape, error possibility, and downstream logging workflow, so an agent has enough to invoke it correctly.

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%, so the description must fully document all six parameters. It does: `checks` names the allowed check families, `expect_file` and `board_json_path` explain live vs offline sources, `nets` explains the return-via-audit population, `max_distance_mils` gives the centre-to-centre rule and default 40, and `limit` clarifies per-kind finding truncation.

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?

The description states a precise read-only audit action: measuring a board for layout-stage exit gates, with six named internal checks. It clearly distinguishes this aggregated audit from pcb_autoroute, pcb_run_drc, and the many single-purpose audit_find_* siblings by listing the exact check families it combines.

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?

It gives clear when-to-use context: run it before passing layout exit gates, then log the result as `data` on the stage_result for `design_next_action` to evaluate. It also explains the live vs saved-JSON modes. However, it does not explicitly say when to use this aggregate over sibling tools like `pcb_run_drc` or individual `audit_find_*` checks.

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