save_document
Saves the current SOLIDWORKS document in place or to a given path; file extensions export copies, and existing files or unsaved referenced files require explicit overwrite or save approval.
Instructions
Save the current document. With filepath it is saved under that name and the extension chooses the format: .SLDPRT / .SLDASM / .SLDDRW keep the document, while .pdf, .step, .stl, .dxf and the like export a copy; without filepath it saves in place. Saving a drawing or assembly that has open referenced files with unsaved changes is refused (naming them) unless save_referenced is true, and a Save As onto an existing file (other than the document's own) is refused unless overwrite is true. A refusal saves nothing.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "save_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filepath | No | Full path to save under; leave out to save in place | |
| overwrite | No | Save As: replace a file that already exists at filepath | |
| save_referenced | No | Drawing or assembly: also write the referenced files that have unsaved changes (they are listed in the result) |