Replace Schematic Component
replace_schematic_componentReplace a placed component's symbol in a KiCad schematic while preserving its position, rotation, and field values. Optionally set a new rotation and get updated pin positions.
Instructions
Replace a placed component's symbol with a different one (e.g. Device:R -> Device:R_Potentiometer), preserving its position, rotation, and field values (Value/Footprint/custom). Optionally override rotation with newRotation. Returns the new pin positions.
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": {
"schematicPath": "<schematicPath>",
"reference": "<reference>",
"newSymbol": "<newSymbol>"
},
"name": "replace_schematic_component"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| newSymbol | Yes | New symbol in 'Library:Symbol' form (e.g., Device:D_Zener) | |
| reference | Yes | Reference of the component to replace (e.g., D1) | |
| newRotation | No | Override rotation in degrees (default: keep existing) | |
| schematicPath | Yes | Path to the .kicad_sch file |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |