Skip to main content
Glama

Create Document

create_doc

Create a new AFFiNE document with an optional title and plain-text content, linked under a parent doc or placed in a folder to keep your workspace sidebar organized.

Instructions

Create a new AFFiNE document with optional plain-text content stored as one paragraph. Use create_doc_from_markdown for native headings, lists, links, and code blocks. If parentDocId is provided, the new doc is linked into the sidebar tree immediately. If folderId is provided, the doc is placed inside that folder in the sidebar.

Input Schema

NameRequiredDescriptionDefault
titleNoOptional initial document title.
contentNoOptional initial plain text stored as one paragraph. Use create_doc_from_markdown for structured Markdown.
folderIdNoOptional folder ID to place the doc in. Use list_organize_nodes to find folder IDs.
parentDocIdNoOptional parent doc to link the new doc under in the sidebar.
workspaceIdNoAFFiNE workspace id. Omit only when AFFINE_WORKSPACE_ID is configured.

Output Schema

NameRequiredDescriptionDefault
okNo
codeNo
kindNo
docIdNo
errorNo
stageNo
titleNo
statusNo
detailsNo
folderIdNo
warningsNo
causeCodeNo
retryableNo
parentDocIdNo
workspaceIdNo
folderLinkedNo
folderNodeIdNo
linkedToParentNo
contentPersistedNo
recoveryGuidanceNo
metadataPersistedNo
requiresManualRepairNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.10.2

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare the safety profile (not read-only, not destructive, not idempotent, open-world), so the description does not need to repeat it. The description adds useful behavioral detail: content is stored as one paragraph, and parentDocId/folderId cause immediate sidebar-tree linking or folder placement. It does not discuss creation of duplicate docs on repeated calls, but the non-idempotent annotation covers that.

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

Conciseness4/5

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

Well-structured and front-loaded: core action first, then the sibling alternative, then parameter-specific sidebar behavior. Every sentence contributes, though the parentDocId and folderId sentences could be slightly tighter and arguably mirror what is already in the schema.

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?

Given the output schema and rich annotations, the description covers what an agent needs to choose and invoke this tool correctly: plain-text limitation, sibling alternative, and sidebar placement effects. It does not explain return shape or failure conditions, but those are covered by the output schema and annotations.

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 every parameter, including the plain-text/paragraph behavior and the sidebar semantics of parentDocId and folderId. The description adds no parameter guidance beyond what the schema already says, so the baseline 3 applies.

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?

States a specific verb and resource ('Create a new AFFiNE document') and immediately distinguishes it from the nearest sibling, create_doc_from_markdown, by contrasting plain-text content with structured Markdown support.

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?

Explicitly routes the agent: use this tool for plain-text single-paragraph content, and use create_doc_from_markdown for headings, lists, links, and code blocks. It also clarifies the sidebar consequences of parentDocId and folderId, so the agent knows what placement behavior to expect.

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