Add a raw feature
onshape_add_featureAdds a custom feature to a Part Studio by posting a hand-written BTM payload, enabling feature types without a dedicated tool. Read the feature specs first.
Instructions
Post a hand-written BTM feature payload to a Part Studio. The escape hatch for feature types this server has no dedicated tool for — read onshape_get_feature_specs first.
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": {
"doc": "<doc>",
"ws": "<ws>",
"elem": "<elem>",
"feature": "<feature>"
},
"name": "onshape_add_feature"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ws | Yes | Workspace id — the <ws> segment of the document URL. | |
| doc | Yes | Document id — the <doc> in cad.onshape.com/documents/<doc>/w/<ws>/e/<elem>. | |
| elem | Yes | Element id (tab) — the <elem> segment of the document URL. | |
| feature | Yes | The feature JSON, usually a BTFeatureDefinitionCall-1406 envelope. | |
| validate | No | Re-read the feature list afterwards and fail if the feature regenerated with an error (default true). |