Skip to main content
Glama

pcb_clear_source_footprint_library

Clears SourceFootprintLibrary on board components to remove stale library references that block ECO and Update From Library; optionally restrict clearing to specified designators.

Instructions

Clear Comp.SourceFootprintLibrary on board components.

Background: when a project is created from an Integrated Library, every placed component remembers WHICH library it came from. If the user later renames, moves, or consolidates that library, ECO and "Update From Library" start failing with "library not found" warnings because the component still points at the stale path. Clearing SourceFootprintLibrary unpins it so Altium re-matches by library-reference name from whatever's currently in Available Libraries.

This is a standard step when consolidating multiple legacy libraries into a single curated library: drop the new lib into Available Libraries, call this tool, then run an ECO -- the components now bind to the new library.

Generalized with an optional filter.

Args: designator_filter: Restrict to these designators (e.g. ["U1", "U5"]). None / empty clears all components on the board. Match is case-sensitive whole-string.

Returns: Dict with {total, cleared}. total counts components inspected after filter; cleared counts ones that actually had a non-empty SourceFootprintLibrary cleared.

Input Schema

NameRequiredDescriptionDefault
designator_filterNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.5/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 burden and does most of it well: it explains what is being unset, what Altium does afterward (re-match by library-reference name), and where it fits in a workflow. It omits practical preconditions such as needing an active PCB document and whether the change is persisted in-memory versus on disk.

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?

The action is front-loaded in the opening sentence and the rest is well-organized into background, workflow, args, and returns. The failure-mode narrative is slightly verbose for the decision it supports, but every paragraph carries real information.

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 one-parameter mutation tool with an output schema, this covers purpose, motivation, sequencing, filter behavior, and even return-value semantics ({total, cleared}). An agent has everything needed to call it correctly and to explain the result.

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: it defines the filter's meaning, the None/empty behavior ('clears all components on the board'), the example format (["U1", "U5"]), and the matching rule (case-sensitive whole-string). Nothing about the single parameter is left ambiguous.

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?

First sentence gives a specific verb and a precisely named target property on a named object class ('Clear Comp.SourceFootprintLibrary on board components'), which is far beyond a tautology of the tool name. The background makes the effect of the operation unambiguous.

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?

It clearly states the triggering conditions (library renamed/moved/consolidated, 'library not found' ECO or Update-From-Library failures) and gives an ordered recipe: install new lib into Available Libraries, call this tool, run ECO. It does not, however, reference the obvious sibling alternatives (lib_clear_source_library, sch_clear_source_library) that an agent could confuse this with.

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