Create document
create_documentCreates a new Onshape document in the user's account and returns its IDs, URL, and existing tabs; private by default.
Instructions
Create a new, empty-looking Onshape document in the user's account and return its
document_id, workspace_id, name, url and the tabs it already has (Onshape usually adds a
'Part Studio 1' and an 'Assembly 1': reuse and rename them before adding more with
create_element). Private by default. Onshape's FREE plan only allows PUBLIC documents:
the call then fails with nothing created and a message to ask the user, because a public
document is visible to everyone; retry with public=true only after they agree. Use it only
when the user wants a new document; to work in an existing one find it with
list_documents. There is no tool to delete a document, so tell the user a scratch
document stays in their account until they delete it in Onshape.
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": {
"name": "<name>"
},
"name": "create_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Document name. | |
| public | No | Make the document visible to everyone. Leave false unless the user's plan requires it: Onshape's FREE plan can only create public documents (the call then fails and tells you to retry with public=true - only do that after the user agrees). | |
| description | No | Optional description. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||