Create Comment
create_commentAdd a new comment to an existing AFFiNE document to capture feedback or start discussion threads. Use update_comment instead when editing an existing comment.
Instructions
Create a new comment on an existing document. This writes collaboration state; use update_comment when editing an existing comment instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| docId | Yes | Document id that will receive the new comment. | |
| content | Yes | Plain comment text, a legacy { text } object, or a native AFFiNE { snapshot } payload. Plain text is converted to a renderable BlockSuite snapshot. | |
| docMode | No | Document surface for the comment. Defaults to page. | |
| docTitle | No | Optional document title stored with the comment metadata. | |
| mentions | No | Optional AFFiNE user ids to mention in the comment. | |
| workspaceId | No | AFFiNE workspace id. Omit only when AFFINE_WORKSPACE_ID is configured. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| ok | No | ||
| code | No | ||
| kind | No | ||
| docId | No | ||
| error | No | ||
| comment | No | ||
| details | No | ||
| causeCode | No | ||
| commentId | No | ||
| retryable | No | ||
| workspaceId | No | ||
| recoveryGuidance | No |