Delete feature
delete_featurePermanently 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
| Name | Required | Description | Default |
|---|---|---|---|
| element_id | Yes | Element (tab) ID: the string after /e/ in the Onshape URL. Get it from get_document. | |
| feature_id | Yes | Feature ID as returned by list_features or a create tool. | |
| document_id | Yes | Onshape document ID: the 24-character hex string after /documents/ in the document URL. Get it from list_documents. | |
| workspace_id | No | Workspace ID (the string after /w/ in the URL). Optional - defaults to the document's main workspace. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||