delete_library_symbol
Delete a symbol from a project library, as "Delete" of the library tree of the symbol editor of KiCad 10 does.
Instructions
Delete a symbol from a project library, as "Delete" of the library tree of the symbol editor of KiCad 10 does.
KiCad deletes a symbol together with all symbols derived from it (also the derived symbols of a derived symbol). With delete_derived=False, a symbol with derived symbols is an error that gives their names. delete_derived=True deletes them all, as "Delete All Listed Symbols" of KiCad.
KiCad does not change the schematics that use a deleted symbol, and neither does the tool: the answer gives the placed symbols with a deleted lib_id as a warning. The schematic keeps its copy of each symbol, but an update from the library then fails.
The library must be a symbol library file of the project table, in the version of the installed KiCad (else: upgrade_project_libraries first). KiCad saves the library (kicad-cli), and a second save must give the same bytes. 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>"
},
"name": "delete_library_symbol"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lib_id | Yes | The symbol, "<library>:<symbol>", of a library of the project table. | |
| project_path | Yes | The .kicad_pro file or the project folder. | |
| delete_derived | No | True deletes the symbols derived from the symbol too. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |