Skip to main content
Glama
onshape-jamcp

onshape-jamcp

Delete feature

delete_feature
Destructive

Permanently remove a single feature from a Part Studio to undo one that failed or is no longer wanted. Delete from the end of the tree backward, since dependent features fail.

Instructions

Permanently remove one feature from a Part Studio (an extrude, a fillet, a variable, a pattern, ...). Use it to undo a feature that went wrong (status ERROR, or a warning that nothing changed) or that is no longer wanted; to change a feature instead, use update_feature. Features that depend on the deleted one fail afterwards (deleting a sketch breaks the extrude that uses it), so delete from the end of the tree backwards, or delete the dependents too, and check list_features for ERROR statuses. The call returns only the deleted feature_id. There is no trash: only Onshape's version history can bring the feature back.

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": {
      "document_id": "<document_id>",
      "element_id": "<element_id>",
      "feature_id": "<feature_id>"
    },
    "name": "delete_feature"
  }
}

Input Schema

NameRequiredDescriptionDefault
element_idYesElement (tab) ID: the string after /e/ in the Onshape URL. Get it from get_document.
feature_idYesFeature ID as returned by list_features or a create tool.
document_idYesOnshape document ID: the 24-character hex string after /documents/ in the document URL. Get it from list_documents.
workspace_idNoWorkspace ID (the string after /w/ in the URL). Optional - defaults to the document's main workspace.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds important behavior beyond them: the deletion is permanent with no trash, only version history can restore it, dependent features fail afterward, and the call returns only the deleted feature_id. These details are exactly what an agent needs before performing a destructive mutation.

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 front-loaded with the core action and usage guidance, and almost every sentence earns its place by covering alternatives, dependency behavior, and recovery constraints. The sentence about the return value is slightly redundant because an output schema exists, but overall it remains efficient and well-structured.

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?

For a destructive mutation tool with full schema coverage and an output schema, the description is complete enough: it covers purpose, when to use it versus update_feature, dependency risks, recovery limitations, and return behavior. An agent has all the context needed to invoke it correctly and safely.

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

Parameters3/5

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

Schema description coverage is 100%, so the input schema already documents all four parameters including element_id, feature_id, document_id, and workspace_id. The description adds no additional parameter format or constraint information beyond what the schema provides, so baseline 3 is appropriate.

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?

States a specific verb and resource: 'Permanently remove one feature from a Part Studio', with examples of feature types. It explicitly distinguishes itself from the sibling update_feature, so an agent can tell which tool to use without reading the schemas.

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

Usage Guidelines5/5

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

Gives explicit when-to-use conditions: undo a feature with ERROR status or an unwanted warning, or remove a no-longer-wanted feature. It also names update_feature as the alternative when changing instead of deleting, and provides guidance on dependency order and checking list_features.

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