Skip to main content
Glama

lib_link_footprint

Links a footprint to a named schematic component, replacing any existing footprint model by default so component-to-footprint assignments stay current.

Instructions

Link a footprint to a schematic component.

With replace=True (the default) any existing footprint (PCBLIB) model on the component is removed first, so re-linking replaces rather than appends. Pass replace=False to keep prior footprint models and add another (the old append behaviour, which bloats a component with duplicate models).

Args: component_name: Name of the schematic component. Resolved by library reference and made current before linking, so the model lands on the symbol you name rather than on whatever was last created. Leave empty to target the current component. footprint_name: Name of the footprint to link footprint_library: NOT APPLIED, accepted only so existing callers keep working. The footprint is bound by NAME via the implementation's datafile link, with a deliberately EMPTY location: passing a .PcbLib path there wedges AD26 (see Lib_LinkFootprint in Library.pas). Install the library and keep footprint names unambiguous instead. replace: remove existing footprint models before adding (default True)

Returns: Dictionary confirming link

Input Schema

NameRequiredDescriptionDefault
replaceNo
component_nameYes
footprint_nameYes
footprint_libraryNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.7/5.0
Behavior5/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 does so well: it discloses that replace=True destroys existing PCBLIB models, that the default is True, that component_name re-resolves the current component (side effect), and that footprint_library is a no-op that can wedge AD26. That is exactly the kind of destructive/side-effect disclosure an agent needs before calling.

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 core action and the replace caveat before the Args list, which is the right ordering. Some implementation trivia (Library.pas, AD26 version reference) is longer than strictly necessary, though it justifies the warning.

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?

A mutation tool with no annotations and no schema descriptions needs thorough prose, and it delivers: behaviour, defaults, deprecation, and resolution semantics are all covered. An output schema exists, so the terse 'Dictionary confirming link' return note is sufficient.

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%, but the Args section documents all four parameters, including the subtle empty-string behaviour of component_name and the fact that footprint_library is accepted but ignored. This fully compensates for the absent schema descriptions.

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 (link a footprint to a schematic component) in the very first sentence, and the replace semantics distinguish it from append-style linking. An agent can tell this apart from siblings like lib_link_3d_model or lib_add_footprint_pad without reading further.

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 explicit guidance on when to use replace=True vs replace=False and warns against the stale behaviour of passing a .PcbLib path. It stops short of naming a sibling alternative for the append case, but the conditions for each mode are unambiguous.

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