Skip to main content
Glama

copy_footprint_to_library

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

Instructions

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

The Value gets the new name when it was equal to the old name. KiCad saves the footprint (kicad-cli), and a second save must give the same bytes. The target must be a footprint library of the project table in the version of the installed KiCad (else: upgrade_project_libraries first). A footprint that is not on F.Cu is refused. 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_footprint_to_library"
  }
}

Input Schema

NameRequiredDescriptionDefault
lib_idYesThe footprint, "<library>:<footprint>".
new_nameNoThe new name. Default: the old name.
overwriteNoTrue replaces a footprint with the same name in the target (KiCad: Overwrite). False refuses it.
project_pathYesThe .kicad_pro file or the project folder.
target_libraryYesThe nickname of the target in the project footprint table.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

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 well: it discloses that KiCad performs the save via kicad-cli, that the operation is byte-identical on repeat (deterministic/idempotent), and the refusal conditions (non-F.Cu footprint, project open, wrong KiCad version). The one soft spot is the second sentence, "The Value gets the new name when it was equal to the old name", which hints at a field-rewrite side effect but is too terse to be unambiguous.

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?

Short and mostly front-loaded: the action and its editor analogue come first, then the environment and refusal constraints. The cryptic "Value gets the new name" sentence sits awkwardly in second position and interrupts the flow, costing a point, but there is no filler.

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?

An output schema exists and all five parameters are documented in-schema, so the description need only cover preconditions and side effects, which it largely does for this mutation tool. Remaining gaps are minor: error/return surface is left to the output schema, and file-lock behavior beyond "project must not be open" is unstated.

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, and the description goes beyond it by constraining target_library to a project-table footprint library and by qualifying the new_name default with the conditional Value-renaming rule. It adds real meaning for two of the five parameters rather than merely restating them.

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?

Opens with a specific verb+resource: "Copy a footprint into a library of the project table", and anchors it to a concrete analogue ("Save As" in the KiCad 10 footprint editor). That framing lets an agent distinguish it from copy_symbol_to_library and from the rename/delete footprint siblings without inspecting schemas.

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 explicit preconditions and routes to an alternative: the target must be a footprint library of the project table "in the version of the installed KiCad (else: upgrade_project_libraries first)", the project must not be open in KiCad, the installed KiCad must be 10.0, and non-F.Cu footprints are refused. These are precisely the when/when-not conditions an agent needs before calling.

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