Write a Feature Studio
onshape_set_feature_studioReplace the entire FeatureScript source of an Onshape Feature Studio to update custom feature logic. Provide document, workspace, element IDs, and the complete new code.
Instructions
Replace the FeatureScript source of a Feature Studio. The whole file is overwritten.
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>",
"contents": "<contents>"
},
"name": "onshape_set_feature_studio"
}
}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. | |
| contents | Yes | The complete new FeatureScript source. |