Delete document
delete_documentDelete a document by moving it to the Paperless trash, where it can be restored; confirmation is required before deletion proceeds.
Instructions
Delete a document by moving it to the Paperless trash, from where it can be restored.
Two steps: call without confirm first. Nothing is deleted and the error names the document that would go, with confirm=true to pass. The trash keeps the document until it is emptied (by the administrator's retention setting or by hand); restore it in the Paperless web UI or with the trash toolset if enabled. Needs the permission to view and to delete documents, and the user must own the document, be a superuser, or the document must be unowned (a view or change grant is not enough).
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": {
"document_id": "<document_id>"
},
"name": "delete_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | Must be true to go ahead. Without it nothing changes and the error says what would happen. Describe that to the user and pass true only once they agree, or if they already asked for exactly this. | |
| document_id | Yes | Document id, from search_documents. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | The title the document had. | |
| message | Yes | What happened and how to get the document back. | |
| in_trash | Yes | True: the document is in the trash and can be restored. | |
| document_id | Yes |