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
| Name | Required | Description | Default |
|---|---|---|---|
| lib_id | Yes | The footprint, "<library>:<footprint>". | |
| new_name | No | The new name. Default: the old name. | |
| overwrite | No | True replaces a footprint with the same name in the target (KiCad: Overwrite). False refuses it. | |
| project_path | Yes | The .kicad_pro file or the project folder. | |
| target_library | Yes | The nickname of the target in the project footprint table. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |