Delete a document or tab
delete_documentDelete a document by moving it to the Trash, where it can be restored for 30 days (with restore_document, or from the Trash in the Explorer) before it is purged. With tabId, delete just one of its tabs, outright: tabs have no Trash. Confirm with the user first. A document must keep at least one tab.
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": {
"documentId": "<documentId>"
},
"name": "delete_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabId | No | Delete only this ONE tab instead of the whole document. A document must keep at least one tab, so deleting the last remaining tab is refused. A tab is deleted outright; it does not go to the Trash. | |
| documentId | Yes | The document to delete (from find_documents / read_document). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabId | No | The deleted tab id (tab deletes). | |
| deleted | Yes | Whether the document or one of its tabs was deleted. | |
| trashed | No | True when the document went to the Trash. | |
| documentId | Yes | The document id. | |
| restorableForDays | No | Days the document can be restored with restore_document before it is purged. |