Skip to main content
Glama

lib_clear_source_library

Unpin SchLib symbols from stale source-library provenance by clearing SourceLibraryName, resetting TargetFileName, and syncing DesignItemId, so placements stop relinking to missing libraries.

Instructions

Unpin a SchLib's symbols from their source-library provenance.

Library-side sibling of sch_clear_source_library. Symbols copied in from another library (a vendor pack, a stock library like the built-in miscellaneous-devices set) carry three provenance fields pointing at their ORIGIN: SourceLibraryName, TargetFileName, and DesignItemId. Left stale, every placement from your library re-links against a library that no longer exists on the machine and lands in the state.

Per matching component: clears SourceLibraryName, resets TargetFileName to '*', and syncs DesignItemId to the LibReference (each independently switchable). This is the minimal fast path of what lib_normalize_implementations does inside its full model sweep, when you only need the provenance cleaned, use this. Deferred save: flush with app_save_all.

Args: library_path: absolute .SchLib path; empty = focused library. component_names: restrict to these LibReferences; None/empty = every component in the library. clear_target_file_name: reset TargetFileName to '*'. sync_design_item_id: set DesignItemId = LibReference where they differ.

Returns: {"library_path": ..., "total": inspected, "cleared_source_library": n, "cleared_target_file_name": n, "synced_design_item_id": n}.

Input Schema

NameRequiredDescriptionDefault
library_pathNo
component_namesNo
sync_design_item_idNo
clear_target_file_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 full burden and does most of it: it discloses exactly what is mutated (SourceLibraryName cleared, TargetFileName reset to '*', DesignItemId synced), that each sub-operation is independently switchable, and that the save is deferred requiring app_save_all to flush. It does not state whether the change is undoable or what happens on partial failure, which is the remaining gap for an unannotated mutation.

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 verb and rationale before the mechanics, and organized into prose + Args + Returns. It runs long and the wrapped 'Library-side sibling' fragment is slightly awkward, but every sentence (including the deferred-save warning) carries information an agent needs.

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?

Complete for a 4-parameter mutation with no annotations: motivation, scope, per-parameter behavior, deferred-save handling, and sibling routing are all present. An output schema exists, yet the description still summarizes the return counters, which is helpful rather than redundant given the plural per-field result keys.

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 description coverage is 0%, so the description must compensate entirely — and it does: empty library_path means the focused library, None/empty component_names means every component, clear_target_file_name resets to the literal '*', and sync_design_item_id sets DesignItemId = LibReference 'where they differ.' Each parameter gains semantics the bare schema lacks.

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 ('Unpin a SchLib's symbols from their source-library provenance') and names the exact fields affected. It explicitly distinguishes itself from two siblings — sch_clear_source_library (the schematic-side counterpart) and lib_normalize_implementations (the full sweep) — so an agent can route correctly without opening any schema.

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 alternative and the condition that selects it: use lib_normalize_implementations for a full model sweep, use this 'when you only need the provenance cleaned.' The opening sentence also states the failure mode that motivates calling it (stale provenance → <Not Found>), which tells the agent when the tool is warranted.

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