Skip to main content
Glama

lib_get_pad_geometry

Retrieves full-precision pad geometry in millimetres for a PcbLib footprint, enabling accurate datasheet land-pattern audits and tolerance comparisons without integer-mil rounding errors.

Instructions

Full-precision pad geometry of one PcbLib footprint, in mm.

The measurement half of the datasheet land-pattern audit. Unlike the integer-mil dump behind lib_audit_footprint_policies, every dimension here is a float in millimetres (a 0.65 mm pitch loses 10 um to integer-mil rounding, which a tolerance comparison against the datasheet cannot afford). Coordinates are relative to the footprint's own origin.

Args: footprint_name: the footprint name in the library. library_path: optional .PcbLib path; defaults to the focused library.

Returns: {name, description, library_path, pad_count, pads: [{ name, x_mm, y_mm, copper_x_mm, copper_y_mm, w_mm, h_mm, shape, corner_pct, rotation, hole_rotation, hole_mm, hole_w_mm, hole_type, slot_aligned (slots only), plated, layer, paste_expansion_mm, paste_expansion_source, paste_expansion_state, mask_expansion_mm, mask_bottom_expansion_mm, mask_separate, mask_expansion_source, mask_expansion_state}]}. mask_expansion_mm is the TOP side when mask_separate is true and both sides when it is false; mask_bottom_expansion_mm is the stored bottom value, which takes effect once the sides are unlinked even while it is not in use. x_mm/y_mm are the pad's origin; copper_x_mm/copper_y_mm are the centre of its copper, which differs on a custom pad. hole_rotation is relative to the pad, so a slot lines up when the copper's and the hole's long axes agree in the pad's frame, which slot_aligned reports. *_expansion_source is 'manual' when the pad overrides the design rule, 'rule' otherwise (value 0 in that case: the rule's value lives in the design rules, not on the pad); *_expansion_state is the cache's own manual, valid or invalid.

Input Schema

NameRequiredDescriptionDefault
library_pathNo
footprint_nameYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.2/5.0
Behavior4/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 substantial work: precision rationale (0.65 mm pitch loses 10 um to integer-mil rounding), coordinate frame (relative to the footprint's own origin), and the meaning of expansion source/state values. It never explicitly says the call is read-only and has no side effects, which is the one behavioral gap for an unannotated tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening is well front-loaded, but a large fraction of the text enumerates the return object's fields, and an output schema already exists, so much of that is duplication. The genuinely additive parts (slot_aligned, expansion source/state, copper vs pad origin) are buried inside the field dump rather than stated up front.

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 2-parameter read tool with an output schema, this covers purpose, unit, coordinate frame, defaults, and the ambiguous return-field semantics. What is missing is only the read-only/no-side-effect statement, which matters because no annotations are supplied.

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: footprint_name is defined as the name in the library, and library_path is defined as an optional .PcbLib path defaulting to the focused library. That resolves the two parameters that the schema leaves as bare typed fields with only titles.

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: full-precision pad geometry of one PcbLib footprint, in mm. It explicitly distinguishes itself from lib_audit_footprint_policies (integer-mil dump) and implicitly from the other footprint readers, so an agent can identify it 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 Guidelines4/5

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

"The measurement half of the datasheet land-pattern audit" gives a clear usage context, and the explicit contrast with lib_audit_footprint_policies tells the agent when the alternative is the better pick. It stops short of naming exclusions against the many other pad/footprint readers (lib_get_footprint_primitives, pcb_get_pad_properties, lib_audit_footprint_vs_datasheet), so no explicit when-not.

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