Delete Document
delete_docPermanently removes a document from an AFFiNE workspace and requests content deletion after exact doc ID confirmation; use only for destructive cleanup.
Instructions
Remove a document from the workspace list and request content deletion. AFFiNE servers may acknowledge this request while retaining readable content that still syncs. Content deletion is reported only after absence is verified; otherwise the result is partial with a warning. This is destructive; use trash_doc for recoverable cleanup or revoke_doc to remove public access.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| docId | Yes | AFFiNE document id. | |
| workspaceId | No | AFFiNE workspace id. Omit only when AFFINE_WORKSPACE_ID is configured. | |
| confirmDocId | Yes | Must exactly match docId to confirm permanent document deletion. | |
| expectedRevision | No | Optional read_doc revision of this primary document. Reject stale content before writing. Covers document content, not workspace metadata; requires all writers to share one MCP server. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| code | No | ||
| kind | No | ||
| docId | No | ||
| error | No | ||
| deleted | No | ||
| details | No | ||
| causeCode | No | ||
| retryable | No | ||
| workspaceId | No | ||
| recoveryGuidance | No |