set_component_attribute
Updates a specific component attribute in an LTspice .asc schematic. Handles standard slots like SpiceLine, Value, and SpiceModel, and supports arbitrary key=value pairs via SpiceLine.
Instructions
Set a schematic-only component attribute. The standard LTspice slots are Value, Value2, SpiceLine, SpiceLine2, SpiceModel, InstName — anything else is rejected, since LTspice silently ignores unknown SYMATTR keys at netlist time. To set arbitrary KEY=val pairs (e.g. W=10u L=0.5u), pass them as the SpiceLine value.
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": {
"path": "<path>",
"reference": "<reference>",
"attribute": "<attribute>",
"value": "<value>"
},
"name": "set_component_attribute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to .asc schematic | |
| reference | Yes | Component reference (e.g., 'M1', 'R1') | |
| attribute | Yes | Attribute name (e.g., 'SpiceLine', 'SpiceModel', 'Value2') | |
| value | Yes | Attribute value (e.g., 'W=10u L=0.5u') |