Skip to main content
Glama

lib_add_footprint_pad

Adds a pad to a named or current PCB footprint, specifying designator, position, size, shape, drill hole, layer, and rotation.

Instructions

Add a pad to a footprint: the named one, or the current one.

Args: designator: Pad designator (e.g., "1", "2") x: X coordinate in mils y: Y coordinate in mils x_size: Pad X size (default 60 mil) y_size: Pad Y size (default 60 mil) hole_size: Drill hole size (0 for SMD). A drilled pad is forced through-hole (MultiLayer); a hole-less pad is SMD on layer. shape: Pad shape -- "round", "rectangular", "octagonal", or "roundrect" (rounded-rectangle, the modern IPC SMD default). An oval/obround is "round" with x_size != y_size. layer: Layer for an SMD pad ("TopLayer"/"BottomLayer"); ignored for through-hole pads (always MultiLayer). rotation: Pad rotation in degrees corner_radius: Corner radius percentage for shape="roundrect" (Altium stores RR radius as a %; 25 is typical). footprint_name: 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: "mil" (default) or "mm", for every length and coordinate here. Millimetres are kept exact: 1.625 mm used to arrive as 64 mil and read back as 1.6256 mm.

Returns: Dictionary confirming pad addition

Input Schema

NameRequiredDescriptionDefault
xYes
yYes
layerNoTopLayer
shapeNorectangular
unitsNomil
x_sizeNo
y_sizeNo
rotationNo
hole_sizeNo
designatorYes
corner_radiusNo
footprint_nameNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does so well: it discloses that a drilled pad is forced through-hole/MultiLayer, that layer is ignored for through-hole, that a missing footprint_name silently depends on ambient editor state (and the tool refuses rather than misfiling), and that mm values are preserved exactly. Minor gaps: no mention of what happens on duplicate designators or failure modes beyond the footprint case.

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 purpose sentence, then a scannable Args list with the most consequential semantics attached to each parameter. Slight bloat in asides ('used to arrive as 64 mil and read back as 1.6256 mm') that explain history rather than behavior, costing a bit of density.

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 12-parameter mutating primitive tool with no annotations, the description is nearly complete, and an output schema exists so return values needn't be described. What is missing is small but real: error conditions (duplicate designator, invalid shape string, out-of-range rotation) and any ordering/idempotency notes.

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%, so the description must compensate and it does: all 12 parameters get meaning, including defaults (60 mil size, layer TopLayer, corner_radius 25), enum-like values for shape, the roundrect radius being a percentage, the oval-is-round-with-unequal-sizes trick, and units applying to every length. This adds substantially more than the schema's bare 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?

Opens with a specific verb+resource: 'Add a pad to a footprint', and immediately qualifies the target ('the named one, or the current one'). This is a concrete primitive-creation operation distinguishable from siblings like lib_add_footprint_pads (batch), lib_set_pad_properties, and lib_add_footprint_track.

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 clear operating context, notably the footprint_name semantics: empty means the editor's current footprint, a name makes that footprint current first and refuses if it cannot. That is real guidance about preconditions. It stops short of explicitly contrasting with the sibling batch tool lib_add_footprint_pads or stating when to create a footprint first (lib_create_footprint).

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