rename_library_symbol
Give a symbol of a project library an other name, as "Rename" of the library tree of the symbol editor of KiCad 10 does.
Instructions
Give a symbol of a project library an other name, as "Rename" of the library tree of the symbol editor of KiCad 10 does.
As the rename dialog, the tool removes the white space at the two ends of the name and writes the escapes of the name ("{colon}" for ":"). A space stays a space (not "_", as in create_derived_symbol). The Value gets the new name when it was equal to the old name. The symbols derived from the symbol extend the new name.
A name that the library has already is an error, also with an other case (KiCad compares the names with no difference of case): the tool does not replace a symbol. A change of only the case of the name of the symbol itself is not an error.
KiCad does not change the schematics that use the old name, and neither does the tool: the answer gives the placed symbols with the old lib_id as a warning.
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>",
"new_name": "<new_name>"
},
"name": "rename_library_symbol"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lib_id | Yes | The symbol, "<library>:<symbol>", of a library of the project table. | |
| new_name | Yes | The new name. | |
| project_path | Yes | The .kicad_pro file or the project folder. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |