Boolean bodies
onshape_booleanCombine CAD bodies using UNION, SUBTRACTION, or INTERSECTION operations; specify target queries for subtraction to cut geometry.
Instructions
Combine bodies: UNION, SUBTRACTION or INTERSECTION. Subtraction also needs the targets query.
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>"
},
"name": "onshape_boolean"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | No | Boolean operation (default UNION). | |
| 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. | |
| name | No | Feature name shown in the tree (default "Boolean"). | |
| tools | No | FeatureScript query selecting the tool bodies. | |
| targets | No | FeatureScript query selecting the target bodies (SUBTRACTION). | |
| tool_ids | No | Deterministic ids of the tool bodies. | |
| validate | No | Re-read the feature list afterwards and fail if the feature regenerated with an error (default true). | |
| keep_tools | No | Keep the tool bodies after the operation. |