Close Document
document_closeClose an AutoCAD document, optionally saving or discarding unsaved changes. Reports saved status and the new active document.
Instructions
Close a document and report saved, discarded_changes and the new active.
Refusals, all before anything is closed: unsaved changes with neither
save nor discard; save on a document that has never been saved (no
path to write — live, Close(True) would open AutoCAD's Save dialog and
block the COM thread); save together with discard. Closing the last
document leaves the backend with none open, which every tool already
reports. drawing_close is the same operation for the active document
with its 1.4 contract kept. Pack: settings · lean: no.
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": "document_close"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| save | No | Write unsaved changes to the document's own path first | |
| discard | No | Close even with unsaved changes, dropping them | |
| name_or_path | No | A name from document_list or the full path; omit for the active document |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||