Skip to main content
Glama

lib_copy_component

Copy a schematic component within or between libraries, replicating all pins, graphics, and parameters, with optional renaming and overwrite.

Instructions

Copy a component WITHIN or BETWEEN schematic libraries.

Replicates the source component (all pins, graphics, parameters) and adds it to the destination library. When dest_library is omitted or equals source_library this behaves as the original same-library duplicate. When dest_library differs, the component is copied across libraries -- the source library is focused for the replicate, then the destination is focused and the clone is added there. The destination ends focused with the new component selected. Save is deferred (call app_save_all to flush).

Args: source_name: lib_ref of the component to copy. new_name: lib_ref for the clone. Defaults to source_name (natural choice for cross-library copies that should keep their identity). source_library: .SchLib path to read from. Defaults to the currently focused document. dest_library: .SchLib path to write to. Omit (or pass the same path as source_library) for a same-library duplicate. overwrite: When True, a component already named new_name in the destination is removed first. Default False returns NAME_EXISTS and changes nothing.

Returns: Dictionary with success, source, new_name, source_library, dest_library, same_library and overwrote flags.

Input Schema

NameRequiredDescriptionDefault
new_nameNo
overwriteNo
source_nameYes
dest_libraryNo
source_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?

With no annotations the description carries the full burden and does so well: it discloses focus changes (source focused for replicate, destination ends focused with new component selected), deferred save requiring app_save_all, and the NAME_EXISTS no-op behavior when overwrite is False. These are exactly the side effects an agent must know before invoking.

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 purpose, then structured Args/Returns sections with zero filler. It is somewhat long, but each clause (focus behavior, save deferral, overwrite/NAME_EXISTS) adds distinct value, so length is justified.

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 mutation tool with no annotations, the description covers side effects, error modes, defaults, and even enumerates the return dictionary keys (though an output schema exists). Nothing an agent needs to call it correctly is missing.

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, and it does: every one of the five parameters is explained with defaults, accepted values (.SchLib path vs lib_ref), and semantics. The overwrite and new_name default behaviors are clarified beyond the bare schema types.

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 (copy) and resource (component) and scopes it explicitly to WITHIN or BETWEEN schematic libraries. The name/title match and the precise 'replicates all pins, graphics, parameters' phrasing let an agent distinguish this from lib_copy_footprint or lib_move_components without opening the schema.

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?

Explains the branching logic clearly: dest_library omitted or equal to source_library yields a same-library duplicate, differing path yields a cross-library copy, and it points to app_save_all for persistence. It doesn't explicitly contrast against sch_replicate_component or lib_copy_footprint, so not a full 5.

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