Rename a part or tab
renameAssign descriptive names to parts or tabs in Onshape, replacing placeholder labels like 'Part 2' or 'Part Studio 1' with meaningful identifiers.
Instructions
Give a part, or a whole tab (Part Studio / Assembly), a descriptive name. Do this by default: a part still called 'Part 2' or a tab still called 'Part Studio 1' says nothing. Keep a name the user chose; rename only placeholders (flagged has_default_name by get_document and list_parts) unless the user asks otherwise.
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": "<name>"
},
"name": "rename"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The new name, e.g. 'M10x40 Hex Bolt' for a part or 'M10 Fasteners' for a tab. | |
| part_id | No | Part ID from list_parts to rename that part. Leave out to rename the whole tab (the Part Studio / Assembly itself). | |
| 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 | |||