Skip to main content
Glama

copy_symbol_to_library

Copy a symbol into a library of the project table, as "Save As" of the symbol editor of KiCad 10 does.

Instructions

Copy a symbol into a library of the project table, as "Save As" of the symbol editor of KiCad 10 does.

To an other library, a derived symbol goes with its parents (KiCad copies the full parent chain; only the symbol gets the new name). flatten=True saves only the flattened symbol, as the "Flatten" check box. The Value gets the new name when it was equal to the old name.

The copy starts from the symbols as KiCad loads them: the text of a save of the library in kicad-cli (about 0.2 s, a cache keeps the last saves). Thus a library that KiCad did not save gives the texts of KiCad: no blanks at the ends of a mandatory field, the canonical field names ("value" is "Value"), "_1" for a second field of one name. The Value follows the new name also when the file has "value" or blanks at the ends of the old name. KiCad saves the library (kicad-cli), and a second save must give the same bytes.

The target must be a symbol library file of the project table in the version of the installed KiCad (else: upgrade_project_libraries first). KiCad must not have the project open. The installed KiCad must be KiCad 10.0.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_path": "<project_path>",
      "lib_id": "<lib_id>",
      "target_library": "<target_library>"
    },
    "name": "copy_symbol_to_library"
  }
}

Input Schema

NameRequiredDescriptionDefault
lib_idYesThe symbol, "<library>:<symbol>", for example "Device:R".
flattenNoTrue saves only the flattened symbol, with no parent.
new_nameNoThe new name. KiCad changes spaces to "_". Default: the old name.
overwriteNoTrue replaces the symbols with the same names in the target (KiCad: Overwrite / Overwrite All). False refuses them.
project_pathYesThe .kicad_pro file or the project folder.
target_libraryYesThe nickname of the target in the project symbol table.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A3.9/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 mostly does: it explains the parent-chain behavior of derived symbols, what flatten=True does, when the Value field is renamed, and that the output is a deterministic library save. It leaves failure modes beyond the stated preconditions (e.g. what happens on a name collision when overwrite=False) to the schema, and the wording is dense enough to obscure some of what it discloses.

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

Conciseness3/5

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

The purpose is front-loaded in the first sentence, but the middle paragraphs pile on low-level implementation detail (0.2 s timing, cache behavior, canonical field names, byte-identical re-saves) that an agent selecting and calling the tool rarely needs. Several sentences are long and grammatically tangled, making the actionable preconditions harder to extract than they should be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter mutation tool with an output schema, the definition covers the environment requirements, the derived-symbol edge case, and the naming side effect on the Value field. Return values need not be described because an output schema exists. The main remaining gap is explicit error/refusal behavior when the target already holds conflicting symbols.

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%, so the baseline is 3, but the description adds genuine meaning: flatten is tied to the KiCad 'Flatten' checkbox and parent chain, and new_name is explained in terms of the Value field being updated only when it matched the old name. That is real semantics beyond the schema text, though overwrite and lib_id are only lightly contextualized.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb and resource (copy a symbol into a project-table library) and anchors it with the 'Save As' analogue from the KiCad symbol editor, which makes the operation immediately intelligible. It does not explicitly name sibling tools such as copy_footprint_to_library or create_derived_symbol to sharpen the boundary, so it stops short of a 5.

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 final paragraph gives real preconditions: the target must be a symbol library of the project table, must match the installed KiCad version, and it routes the agent to upgrade_project_libraries first when that fails. It also states KiCad must not have the project open and requires KiCad 10.0. What is missing is explicit guidance on when to prefer this over create_derived_symbol or rename_library_symbol.

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