Close document
doc_closeCloses a document while handling unsaved changes: save before closing or explicitly discard changes only after user confirmation.
Instructions
Close a document. A document with unsaved changes is closed only with save=true or discard_changes=true; otherwise CONFIRMATION_REQUIRED tells you to ask the user.
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": {
"doc": "<doc>"
},
"name": "doc_close"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc | Yes | Document handle from doc_list/doc_open, e.g. 'doc:12001:0a1b2c3d' | |
| save | No | Save in place before closing | |
| discard_changes | No | Close WITHOUT saving unsaved changes (only after the user explicitly agreed to lose them) |