List parts
list_partsRetrieves the solid and surface bodies a Part Studio produces, returning part IDs, names, body types, and hidden status so you can target parts in downstream modeling and property tools.
Instructions
List the parts (solid and surface bodies) a Part Studio currently produces: part_id,
name, body_type and hidden, one request, read-only. Use it to get the part IDs that other
tools take - get_part_properties and get_body_details (to look at one part), rename,
only_parts / merge_with / part_ids of extrude and the pattern tools, boolean,
insert_instance. Call it again after anything that merges or splits parts (a boolean, an
extrude that adds): IDs can change. A part flagged has_default_name is still called
"Part N": give it a descriptive name with rename. For the feature tree use
list_features; for the tabs of a document get_document.
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": {
"document_id": "<document_id>",
"element_id": "<element_id>"
},
"name": "list_parts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| element_id | Yes | Element (tab) ID: the string after /e/ in the Onshape URL. Get it from get_document. | |
| document_id | Yes | Onshape document ID: the 24-character hex string after /documents/ in the document URL. Get it from list_documents. | |
| workspace_id | No | Workspace ID (the string after /w/ in the URL). Optional - defaults to the document's main workspace. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||