Evaluate FeatureScript
onshape_eval_featurescriptRun a FeatureScript function against a Part Studio and return its decoded value to inspect geometry with custom queries.
Instructions
Run a FeatureScript function against the Part Studio and return its decoded value. The general-purpose way to inspect geometry: 'function(context is Context, queries) { ... }'.
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>",
"script": "<script>"
},
"name": "onshape_eval_featurescript"
}
}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>. | |
| raw | No | Return Onshape's raw response instead of the decoded value. | |
| elem | Yes | Element id (tab) — the <elem> segment of the document URL. | |
| script | Yes | A FeatureScript function expression taking (context, queries). |