Create Part Studio or Assembly
create_elementAdd a new Part Studio or Assembly tab to an Onshape document and return its element ID, name, and kind; check existing tabs first to avoid duplicates.
Instructions
Add a new tab to a document and return its element_id, name and kind: a Part Studio
(where sketches, extrudes and the other features build parts) or an Assembly (where parts
are inserted and mated). Use it when the document has no suitable tab - a new document
already has a Part Studio and an Assembly, so check get_document first and reuse them
instead of piling up empty tabs. Give it a descriptive name (a tab still called 'Part
Studio 1' is flagged has_default_name). The new tab is empty: model in it with
create_sketch / extrude, or fill an Assembly with insert_instance. It does not
create parts, sketches or documents (create_document makes those).
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>",
"name": "<name>"
},
"name": "create_element"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Type of element to add. | part_studio |
| name | Yes | Tab name. | |
| 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 | |||