Skip to main content
Glama

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>, ...} -- change value / 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 in notes as floating.

  • {"op": "set_net", "net", <flag>: <value>, ...} -- change a net's is_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"} -- fold from into into (keeping into's flags), then drop from.

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

NameRequiredDescriptionDefault
plan_jsonYes
operationsYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so thoroughly. It discloses ordered op execution, single validation at the end, automatic bookkeeping effects (deleting a part scrubs it from every net; merging nets de-dupes pins), and the exact error return shape with operation index on failure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but well-structured with a front-loaded purpose and a bulleted operation list that earns its space. Some motivational framing (e.g., the iterative authoring narrative) could be trimmed, but overall the structure is clear and purposeful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a multi-operation plan editor and the presence of an output schema, the description is complete. It covers purpose, operation schemas, side effects, ordering, validation timing, and failure behavior, leaving no critical gap for an agent to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does. It explains plan_json as a JSON string or dict and fully enumerates every operation type with its keys and semantics, effectively documenting the otherwise opaque operations array.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: edit an existing plan. It also positions the tool as the MODIFY complement to the add tools, which helps distinguish it from design_add_part and design_connect_bus. However, it does not explicitly differentiate from other plan-related siblings such as design_preview_plan, design_validate_plan, or design_execute_plan.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear usage context: iterative authoring, fixing a wrong value, dropping a part, or merging nets, and advises using edits instead of re-emitting the whole plan. It does not explicitly state when not to use this tool or name competing alternatives like design_execute_plan, but the scenario is well-defined.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools