Skip to main content
Glama
SolidWorks MCP Python

SolidWorks MCP Python

by locense

Undo

undo
Destructive

Revert one or more recent operations in the active SolidWorks model to step back after a failed feature; reports whether the feature tree changed.

Instructions

Undo the last operations in the active model (Edit > Undo).

Use it to step back after a feature went wrong. SolidWorks accepts an undo with nothing to undo, so the reply says whether the feature tree changed. Needs: an open document. Changes: reverts the last count operations. Returns: data with requested_steps, features_before, features_after and tree_changed.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "undo"
  }
}

Input Schema

NameRequiredDescriptionDefault
input_dataNoNothing is required: `count` defaults to 1.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Goes well beyond the annotations (readOnlyHint=false, destructiveHint=true, idempotentHint=false) by disclosing the document precondition, the edge case that SolidWorks accepts a no-op undo, and that the reply signals whether the tree changed. It does not say whether the undo is itself reversible (redo) or what happens if fewer than `count` operations exist.

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

Conciseness5/5

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

Front-loaded with the action, then short labeled clauses (Needs/Changes/Returns) that each carry distinct information. No sentence is filler, even for a trivially sized tool.

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 a single optional parameter, an existing output schema, and destructive annotations, everything an agent needs (precondition, effect, no-op behavior, tree-change signal) is present. Listing the return keys slightly duplicates the output schema but does no harm.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description adds a little by framing `count` as the number of operations reverted in one call, confirming the granularity is per-operation rather than per-document. No format or limit detail beyond the schema's minimum of 1.

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

Purpose5/5

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

Names a specific verb (undo) and scope ('the last operations in the active model'), plus the UI equivalent (Edit > Undo). It is unmistakably distinct from the add_*/analyze_* siblings, so an agent can select it without opening the schema.

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?

Gives a clear situational trigger ('use it to step back after a feature went wrong') and a precondition ('Needs: an open document'). It does not name an alternative or a when-not case (e.g. redo, or reverting a sketch edit vs. a feature), so it stops short of a 5.

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