get_variables
Fetch all variables from a Variable Studio or Part Studio element by ID, providing direct access to defined parameters for downstream CAD use.
Instructions
Get all variables from a Variable Studio (or Part Studio). Modern Onshape stores variables in dedicated Variable Studio elements; pass a Variable Studio elementId here to read its variables. Pass a Part Studio elementId to read the (usually empty) variables owned by that PS.
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": {
"documentId": "<documentId>",
"workspaceId": "<workspaceId>",
"elementId": "<elementId>"
},
"name": "get_variables"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| elementId | Yes | Variable Studio (preferred) or Part Studio element ID | |
| documentId | Yes | Document ID | |
| workspaceId | Yes | Workspace ID |