Delete Document
delete_docPermanently delete an AFFiNE document after confirmation, reporting workspace-metadata and content deletion separately. Requires matching docId and confirmDocId to ensure intent.
Instructions
Delete a document, wait for the AFFiNE WebSocket outcome, and report workspace-metadata and content deletion separately. This is destructive; use revoke_doc when you only need to remove public access.
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": {
"docId": "<docId>",
"confirmDocId": "<confirmDocId>"
},
"name": "delete_doc"
}
}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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| code | No | ||
| kind | No | ||
| docId | No | ||
| error | No | ||
| deleted | No | ||
| details | No | ||
| retryable | No | ||
| workspaceId | No |