Skip to main content
Glama

lib_audit_footprint_vs_datasheet

Audit a PCB footprint's real pad geometry against a manufacturer datasheet land-pattern spec to find mismatches in pad position, size, shape, drill, pitch, and thermal pad.

Instructions

Audit a footprint against the manufacturer's land pattern.

Deterministic comparison of the REAL pad geometry (read live from the .PcbLib) against a land-pattern spec transcribed from the manufacturer datasheet: pad count, every pad's position / size / shape / drill, the numbering sequence, pitch (implied by positions), the thermal pad, and its paste policy. Alignment is automatic (centroid + best of the four 90-degree rotations), so library origin and rotation conventions do not produce false errors; a MIRRORED pattern is deliberately not compensated and reports as position/sequence errors.

DATASHEET DISCIPLINE: the spec must be transcribed from the manufacturer datasheet fetched in this conversation, and spec.source must cite it (url + figure/page + part number). Symbol metadata, distributor drawings, or memory of a package are not acceptable sources. There are no built-in package tables here, and that is intentional.

The spec (JSON object or string): source: {datasheet_url, reference, part_number} REQUIRED pads: [{name, x, y, w, h, shape?, hole?}] explicit, mm dual_row: {count, pitch, span, pad_w, pad_h, shape?} quad: {count, pitch, span_x, span_y, pad_w, pad_h, shape?} thermal_pad: {name, x, y, w, h, shape?} thermal_paste: 'full' | 'windowed' position_tol / size_tol: mm, default 0.05

dual_row expands with the SOIC/SOP convention (pin 1 top-left, CCW); quad with the QFP/QFN convention (pin 1 top of left side, CCW). For any other numbering give explicit pads. pad_w has two meanings, kept for existing callers: in dual_row it is the pad's X size, ACROSS the row; in quad it runs ALONG the row.

Returns: {ok, rotation_applied_deg, findings: [{check, severity, message, pad?, expected?, actual?}]} plus the footprint geometry under 'footprint' for reference. ok is true only with zero error-severity findings.

Input Schema

NameRequiredDescriptionDefault
spec_jsonYes
library_pathNo
footprint_nameYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does so well: it discloses determinism, automatic centroid + four-rotation alignment, that mirroring is deliberately NOT compensated, that failures surface as position/sequence errors, and exact ok semantics (true only with zero error-severity findings). It does not state outright that the tool is read-only / mutates nothing, which is the one behavioral trait left to inference.

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, then layered into comparison scope, datasheet discipline, spec grammar, and returns — a reader can stop early. It is long, and the Returns section partly duplicates the existing output schema, plus deep spec grammar arguably belongs in the schema rather than prose.

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

Completeness4/5

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

For a high-complexity geometry audit this covers what an agent needs to construct a valid spec and interpret the result, including tolerance defaults and rotation handling. Remaining gaps are the two string parameters' resolution rules and an explicit read-only statement; return-value documentation is rightly light given an output schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/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 compensate, and it does heavily for the hard parameter: it enumerates the entire spec_json shape (source REQUIRED, pads, dual_row, quad, thermal_pad, thermal_paste, tolerances with defaults) and even disambiguates pad_w's two meanings across dual_row vs quad. However, library_path and footprint_name — including how an empty library_path resolves and what name format is expected — get no explanation at all.

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 — audit a footprint's real pad geometry against a datasheet-transcribed land pattern — and immediately signals what it is not ("There are no built-in package tables here, and that is intentional"), which is the key axis separating it from lib_audit_footprint_vs_package and footprint_check_package. An agent can pick this tool 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 Guidelines4/5

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

Gives a hard precondition for use (the spec must be transcribed from a datasheet fetched in this conversation, with url + figure/page + part number) and rules out symbol metadata, distributor drawings, and memory as sources. It never explicitly names a competing sibling and says "use X instead when...", so it stops short of the top band.

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