Create Comment
create_commentCreate a new comment on an existing AFFiNE document by providing the document ID and content. Optionally include mentions, document mode, title, and workspace ID for richer collaboration.
Instructions
Create a new comment on an existing document. This writes collaboration state; use update_comment when editing an existing comment instead.
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>",
"content": "<content>"
},
"name": "create_comment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| docId | Yes | Document id that will receive the new comment. | |
| content | Yes | Comment content accepted by AFFiNE. Plain strings are normalized to { text }, and rich AFFiNE payload objects are passed through. | |
| 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 | Yes | ||
| ok | Yes | ||
| kind | Yes | ||
| docId | Yes | ||
| comment | Yes | ||
| commentId | Yes | ||
| workspaceId | Yes |