Skip to main content
Glama

Create Comment

create_comment

Add 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

NameRequiredDescriptionDefault
docIdYesDocument id that will receive the new comment.
contentYesPlain comment text, a legacy { text } object, or a native AFFiNE { snapshot } payload. Plain text is converted to a renderable BlockSuite snapshot.
docModeNoDocument surface for the comment. Defaults to page.
docTitleNoOptional document title stored with the comment metadata.
mentionsNoOptional AFFiNE user ids to mention in the comment.
workspaceIdNoAFFiNE workspace id. Omit only when AFFINE_WORKSPACE_ID is configured.

Output Schema

NameRequiredDescriptionDefault
idNo
okNo
codeNo
kindNo
docIdNo
errorNo
commentNo
detailsNo
causeCodeNo
commentIdNo
retryableNo
workspaceIdNo
recoveryGuidanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.10.2

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already disclose that this is a non-readonly, non-idempotent, non-destructive, open-world write. The description adds useful context by saying it writes collaboration state and requires an existing document, though it does not cover side effects such as mention notifications or permissions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two tight sentences with no wasted wording. It front-loads the core action and immediately follows with the sibling-routing guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the full schema coverage, existing output schema, and annotations that cover the safety profile, the description provides enough context for correct invocation. No critical agent-facing detail is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the input schema already explains every parameter in detail. The description adds no parameter-specific syntax or constraints beyond what the schema provides, which is appropriate but not enriching.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: creating a new comment on an existing document. It also explicitly distinguishes this from update_comment, which is the closest sibling action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a clear usage condition and a direct alternative: use this tool to create a new comment, and use update_comment when editing an existing comment. This leaves little ambiguity for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools