Skip to main content
Glama
mcp-server-paperless

mcp-server-paperless

Delete document

delete_document
DestructiveIdempotent

Delete 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

NameRequiredDescriptionDefault
confirmNoMust 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_idYesDocument id, from search_documents.

Output Schema

NameRequiredDescriptionDefault
titleYesThe title the document had.
messageYesWhat happened and how to get the document back.
in_trashYesTrue: the document is in the trash and can be restored.
document_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.2

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the destructiveHint and idempotentHint annotations, it discloses that deletion is a soft delete into a restorable trash, how long the item persists (until retention empties it or manual emptying), and both restoration paths (web UI or trash toolset). It also states the exact permission bar - view plus delete, and ownership, superuser, or unowned document, with a view/change grant explicitly insufficient - which an agent cannot infer from annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with the core action and soft-delete semantics, then proceeds to protocol and permissions in a logical order with no filler sentences. The permission sentence is dense but earns its place given the authorization failure mode it prevents.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter destructive tool with an output schema already present, the description covers the action, the confirmation workflow, the reversibility window, restoration options, and the authorization prerequisites - everything an agent needs to call it correctly and to explain the outcome to a user.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both parameters are already documented in the schema, and the description's confirm guidance largely restates the schema's own 'must be true to go ahead' wording. Baseline 3 applies; the description adds little parameter meaning beyond the structured fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence gives a specific verb (delete), a specific resource (document), and the exact mechanism (move to Paperless trash), which also distinguishes it from a hard-delete or from the sibling delete_note/delete_taxonomy_item tools that act on other resources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It spells out an explicit two-step calling protocol ('call without confirm first') and the condition for passing confirm=true (once the user agrees, or if they already asked for exactly this). It does not name any alternative tool or state a when-not-to-use case, which keeps it short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.