Skip to main content
Glama
Avinash1286

KiCAD MCP Server

by Avinash1286

Replace Instance Lib Ids

replace_instance_lib_ids
Destructive

Replace lib_id references in schematic symbol instances using an explicit old-to-new mapping, enabling library migration (e.g., from eagle_import to curated symbols). Handles mirror-variant suffixes automatically.

Instructions

Replace lib_id references in schematic symbol instances per an explicit old-to-new mapping — the mechanical layer of a library migration (e.g. eagle_import symbols to curated library symbols). Mirror-variant suffixes (__m0/__m90/__m180/__m270) get automatic angle correction; each needs its own mapping entry. Only instances are rewritten; lib_symbols is preserved (use update_symbol_from_library to refresh definitions afterwards).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mappingYesMap of old full lib_id to new full lib_id, e.g. {"eagle_import:C_100n": "Device:C"}. Values are used verbatim.
schematicPathYesPath to the .kicad_sch file
sourceLibraryNoLibrary prefix whose instances are candidateseagle_import

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already flag destructiveHint=true, but the description adds meaningful behavioral context: 'Only instances are rewritten; lib_symbols is preserved' clarifies exactly what is mutated. It also discloses the automatic angle correction for mirror-variant suffixes, which is a non-obvious side effect. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each dense with information: purpose, special-case behavior, and scope/preservation. The description leads with the main action and stays on point without fluff.

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 destructive, migration-specific tool, the description covers purpose, exclusions (lib_symbols preserved), follow-up action, and edge cases (mirror suffixes). An output schema exists, so not explaining return values is acceptable. It gives the agent enough to select and invoke this tool correctly within the migration workflow.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with parameter descriptions, so the baseline is 3. The description adds extra semantic guidance for the mapping parameter: 'Mirror-variant suffixes (__m0/__m90/__m180/__m270) get automatic angle correction; each needs its own mapping entry', which directly informs how to construct mapping keys.

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?

The description opens with a specific verb+resource+scope: 'Replace lib_id references in schematic symbol instances per an explicit old-to-new mapping'. It clearly frames this as the 'mechanical layer of a library migration' and distinguishes itself by noting 'Only instances are rewritten; lib_symbols is preserved (use update_symbol_from_library...)' vs siblings like update_symbol_from_library and replace_schematic_component.

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?

The description gives clear context: when performing a library migration (example eagle_import to curated), use this to rewrite instance lib_ids. It also names a follow-up alternative ('use update_symbol_from_library to refresh definitions afterwards') and warns that mirror-variant suffixes require separate mapping entries. It does not explicitly state 'don't use if ...' but the workflow guidance is strong.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Avinash1286/KiCAD-MCP-Server-THEAVI'

If you have feedback or need assistance with the MCP directory API, please join our Discord server