Read Document Content
read_docReads AFFiNE document block content and revision, returning text and formatting deltas so callers can write with expectedRevision and reject stale edits.
Instructions
Read document block content and its revision via WebSocket snapshot. Pass revision as expectedRevision on a document write to reject stale edits through a shared MCP server. Each block includes plain text and formatting-preserving deltas. Set includeMarkdown: true to also get rendered markdown, which can be lossy for unsupported inline attributes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| docId | Yes | AFFiNE document id. | |
| workspaceId | No | AFFiNE workspace id. Omit only when AFFINE_WORKSPACE_ID is configured. | |
| includeMarkdown | No | If true, includes rendered markdown in the response. Equivalent to also calling export_doc_markdown. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| code | No | ||
| tags | No | ||
| docId | No | ||
| error | No | ||
| title | No | ||
| blocks | No | ||
| exists | No | ||
| details | No | ||
| markdown | No | ||
| revision | No | ||
| causeCode | No | ||
| plainText | No | ||
| retryable | No | ||
| blockCount | No | ||
| recoveryGuidance | No |