lib_rename_component
Repair a schematic-library component whose LibReference contains unreproducible characters by assigning a clean new name via its component index, restoring name-based tool access.
Instructions
Rename one symbol's LibReference in a schematic library (.SchLib).
This is the repair path for a component whose current name carries
bytes a caller cannot reproduce (an embedded double-quote, or a
control char left by a broken import). Address it by
component_index from lib_get_components, give it a clean
new_name, and every name-based tool can reach it again.
The component is removed and re-added under the new name so the
library's internal by-name index is rebuilt. Errors with
NAME_EXISTS if a different component already uses new_name.
Marks the library dirty for deferred save.
Args:
new_name: the clean LibReference to write.
component_name: current LibReference of the target. Provide this
or component_index.
library_path: optional absolute .SchLib path; defaults to the
focused library.
component_index: the integer index from lib_get_components,
the name-free way to pick the target. Provide this or
component_name.
Returns: {"success": true, "library_path": "...", "old_name": "...", "new_name": "..."}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new_name | Yes | ||
| library_path | No | ||
| component_name | No | ||
| component_index | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||