Skip to main content
Glama

lib_audit_footprint_vs_package

Audit an existing PcbLib footprint against its package drawing to catch pad, pin-1, pitch, land, hole, paste, mask, origin, courtyard, silkscreen, assembly and height mismatches; read-only.

Instructions

Audit an existing PcbLib footprint against its package drawing.

Where lib_audit_footprint_vs_datasheet compares pads with a land pattern typed in, this takes the PACKAGE (the same PackageSpec as lib_create_footprint_from_package) and checks the footprint is right for it. Reads only.

Checked: pad count, numbering and pin 1 (a mirror-image footprint, the bottom-view mistake, is named as such); pitch exactly; row span, land sizes and land centres against the IPC-7351B pattern within the deviations measured between real vendor patterns and IPC (a footprint drawn to the vendor's own pattern passes); every land covering the centre of its terminal; holes against the leads; paste on an exposed pad (closed opening plus windows covering 50 to 80 %) and on every land; manual solder mask settings; origin at the package centroid; and, from the footprint's other primitives, a courtyard that encloses the lands and the body, silkscreen off the copper, an assembly outline that follows the body, and the footprint height against the package's maximum. A turned footprint is compared after turning it back. What could not be read is listed under not_examined.

Run footprint_check_package on the package first: an audit against a misread package passes a footprint built from the same misread.

Args: footprint_name: the footprint in the library. package: the PackageSpec as an object or JSON text. density: L, N or M, the IPC pattern compared against. library_path: optional .PcbLib path; default the focused one. assembly_layer, courtyard_layer: the mechanical layers for those roles; empty picks them by the library's layer kind ("Assembly Top" / "Courtyard Top"), then by name.

Returns: {ok, errors, warnings, findings: [{check, severity, message, pad?, expected?, actual?}], examined, not_examined, alignment, metrics, notes, package_check}. ok is true with no error-severity finding.

Input Schema

NameRequiredDescriptionDefault
densityNoN
packageYes
library_pathNo
assembly_layerNo
footprint_nameYes
courtyard_layerNo

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?

With no annotations, the description carries the full burden and does: 'Reads only' declares the safety profile, the tolerance philosophy is disclosed ('within the deviations measured between real vendor patterns and IPC (a footprint drawn to the vendor's own pattern passes)'), and behavior on rotations and on unreadable items (not_examined) is stated.

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 purpose and sibling differentiation, then checks, prerequisite, args and returns in a predictable order; nearly every clause earns its place. It is long and the check list reads as a dense run-on, but the density is information, not filler.

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?

Given an output schema, return values needn't be explained, yet the description still summarizes the finding shape and the ok/not_examined semantics that determine how a result should be interpreted. Nothing an agent needs to call this correctly 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 description coverage is 0% (titles only), yet the body defines every one of the six parameters, including the density enum values (L, N, M) and its default, the PackageSpec type and that it accepts an object or JSON text, and the fallback rule for assembly/courtyard layers.

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 ('Audit an existing PcbLib footprint against its package drawing') and immediately distinguishes the sibling: 'Where lib_audit_footprint_vs_datasheet compares pads with a land pattern typed in, this takes the PACKAGE'. An agent can choose between the two tools 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 the explicit contrast with the datasheet-audit sibling, plus a hard prerequisite with a reason: 'Run footprint_check_package on the package first: an audit against a misread package passes a footprint built from the same misread.' That is when-to-use, what-to-do-first, and why.

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