Skip to main content
Glama

Create Comment

create_comment

Create 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docIdYesDocument id that will receive the new comment.
contentYesComment content accepted by AFFiNE. Plain strings are normalized to { text }, and rich AFFiNE payload objects are passed through.
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

TableJSON Schema
NameRequiredDescriptionDefault
idYes
okYes
kindYes
docIdYes
commentYes
commentIdYes
workspaceIdYes
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so the description does not need to restate the safety profile. It adds value by noting 'writes collaboration state,' clarifying the nature of the write operation and its scope, which goes beyond the annotations.

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 concise sentences. The first sentence states the action and target; the second adds a necessary sibling distinction. There is no redundant text, and the most important information is front-loaded.

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

Completeness4/5

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

The description covers the core purpose and key alternative, while the schema, annotations, and output schema supply parameter and return details. It does not mention prerequisites like document existence, but 'existing document' implies it. For a creation tool with this schema richness, the description is sufficiently complete.

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 schema already documents all parameters thoroughly. The description does not add parameter-specific details beyond the schema, but it implicitly reinforces that content is for a new comment. This meets the baseline for high schema coverage without further elaboration.

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 clearly states the tool creates a new comment on an existing document, using a specific verb and resource. It also explicitly distinguishes itself from update_comment, which is the primary sibling tool for editing comments, making the purpose unambiguous.

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

Usage Guidelines4/5

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

The description provides clear context: use this for creating new comments, and explicitly names update_comment as the alternative for editing existing comments. It does not provide broader when-not-to-use guidance for other comment-related tools like delete or list, but the key distinction is covered.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/irfanhak123/affine-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server