design_edit_plan
Apply ordered edits to an existing DesignPlan to fix wrong values, drop parts, or merge nets without re-emitting the whole plan, then validate once.
Instructions
Edit an existing plan -- the MODIFY complement to the add tools.
Authoring is iterative: a review turns up a wrong value, a part to drop, two nets that should be one. Fix it with edits instead of re-emitting the whole plan, and let the tool own the error-prone bookkeeping (deleting a part scrubs it from every net; merging nets moves and de-dupes pins). Ordered ops, each sees the previous result; validates once at the end so a now-floating net surfaces.
Operations (each a dict keyed by "op"):
{"op": "set_part", "refdes", <field>: <value>, ...}-- changevalue/footprint/mpn/manufacturer/lib_ref/status/sheet/role/ ... on a part.{"op": "delete_part", "refdes"}-- remove a part; nets it emptied are dropped, nets left with one pin are flagged innotesas floating.{"op": "set_net", "net", <flag>: <value>, ...}-- change a net'sis_power/is_ground/role/force_label/force_wires(fix a forgotten power/ground flag).{"op": "connect_pin", "net", "refdes", "pin"}-- tie a part's pin to a net (fix an unconnected pin); makes the net if new.{"op": "disconnect_pin", "net", "refdes", "pin"}-- remove a pin from a net.{"op": "rename_net", "old", "new"}-- rename a net.{"op": "merge_nets", "into", "from"}-- foldfromintointo(keepinginto's flags), then dropfrom.
Args: plan_json: the DesignPlan as a JSON string or dict. operations: the ordered edit ops.
Returns:
{ok, plan, notes, validation} for the edited plan -- same
validation shape as the add tools. On a bad op,
{ok: False, errors: [...]} naming the operation's index.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan_json | Yes | ||
| operations | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||