Add raw feature (advanced)
add_featureCreate any Onshape Part Studio feature—revolves, sweeps, holes, patterns—by supplying raw feature JSON with native-unit expressions. Use it when standard tools lack the needed feature.
Instructions
Advanced escape hatch: add any Onshape feature from raw JSON - revolve, patterns,
sweeps, holes, and so on. Copy the structure from an existing feature
(list_features with feature_id) or from onshape_api_request on the Part Studio
featurespecs endpoint. Raw JSON uses Onshape's native units (lengths are written as
expressions like '10 mm').
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": "<feature>"
},
"name": "add_feature"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| feature | Yes | Onshape feature JSON (a BTMFeature-134 object with featureType, name and parameters). A full BTFeatureDefinitionCall body is accepted too. | |
| element_id | Yes | Element (tab) ID: the string after /e/ in the Onshape URL. Get it from get_document. | |
| 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 | |||