Skip to main content
Glama

lib_add_footprint_pads

Add multiple pads to the current footprint in one call, with mil or mm units, to avoid repetitive single-pad edits and save cycles.

Instructions

Add MANY pads to the current footprint in ONE call.

PREFER THIS over looping lib_add_footprint_pad. A 64-pad QFP built one pad at a time is 64 LLM turns and 64 PreProcess/PostProcess+save cycles; with this tool it's one turn, one PreProcess/PostProcess, one save. Pad coords are NOT snapped to a grid (footprints use fine pitches like 50 mils / 0.5 mm).

Args: pads: List of pad dicts, each with: - designator (str, required) -- e.g. "1", "2", "A1" - x, y (int, mils), pad centre - x_size, y_size (int, mils, default 60) - hole_size (int, mils, default 0 = SMD) - shape (str, default "rectangular"), one of round / rectangular / octagonal / roundrect (modern IPC rounded-rectangle SMD). Oval = round with x_size!=y_size. - corner_radius (int %, default 25) for shape="roundrect" - rotation (float deg, default 0) - layer (str, default "TopLayer"). Only used for SMD pads (hole_size=0); a drilled pad is forced through-hole (MultiLayer). Use "BottomLayer" for bottom-side SMD. Optional, written only when given: - hole_length (slot length, above hole_size: a slotted hole hole_size wide, along the pad's X before rotation) - plated (false: a non-plated hole) - paste_expansion, mask_expansion (a manual expansion that overrides the design rule; minus the larger pad side closes the paste opening) The reply counts them (slots, unplated, expansions) and any write this Altium build refused (property_failures).

Example, a 4-pad 0402 + corner pad in one call: lib_add_footprint_pads(pads=[ {"designator": "1", "x": -25, "y": 0, "x_size": 30, "y_size": 40}, {"designator": "2", "x": 25, "y": 0, "x_size": 30, "y_size": 40}, ])

footprint_name picks the footprint to write into. Empty uses the editor's current footprint; a name makes that footprint current first and refuses if it cannot, since otherwise the primitives land in whichever footprint another call left current.

units is "mil" (default) or "mm" for every pad in the call: one land pattern, one unit, so half a footprint cannot be drawn in the wrong one. Millimetres are kept exact.

Returns: Dict with added, failed, total counts.

Input Schema

NameRequiredDescriptionDefault
padsYes
unitsNomil
footprint_nameNo

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 load well: it discloses that coordinates are NOT grid-snapped, that drilled pads are forced to MultiLayer regardless of the layer key, that unit selection applies to the whole call so a pattern can't be half-mm, and that refused writes surface as `property_failures`. It does not state what happens to pre-existing pads with the same designator (overwrite vs duplicate) or any permission constraints, which is the remaining gap for a mutating tool.

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 actionable directive and the why, then the parameter reference — a sensible order for a tool of this complexity. It is long, and the example is mildly inconsistent (advertised as "a 4-pad 0402 + corner pad in one call" but shows only two pads), which costs a point without undermining usability.

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 three-param mutation tool with 0% schema coverage, the description supplies everything the agent needs: full nested pad-key reference, unit scoping, footprint targeting rules, and failure reporting. Return semantics are covered by the existing output schema, so the brief 'Returns:' line is the right amount.

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% (pads is an untyped array of open objects), so the description must supply everything — and it does, enumerating every pad key with type, unit, default, and non-obvious semantics (hole_size=0 means SMD, oval = round with x_size!=y_size, corner_radius is percent, hole_length runs along X before rotation, negative paste_expansion closes the opening). It also documents the two top-level params' scoping behavior.

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+cardinality ("Add MANY pads to the current footprint in ONE call") and explicitly contrasts with the sibling `lib_add_footprint_pad`, so an agent can route without opening either schema. The batched nature and the target (footprint pads) are unambiguous.

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 directive ("PREFER THIS over looping lib_add_footprint_pad") backed by a concrete cost rationale (64 turns vs one turn, one PreProcess/PostProcess and save). It also states the selection rule between the two `footprint_name` modes, including that a named footprint 'refuses if it cannot' become current rather than writing to the wrong one.

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