Create Document
create_docCreate 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
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Optional initial document title. | |
| content | No | Optional initial plain text stored as one paragraph. Use create_doc_from_markdown for structured Markdown. | |
| folderId | No | Optional folder ID to place the doc in. Use list_organize_nodes to find folder IDs. | |
| parentDocId | No | Optional parent doc to link the new doc under in the sidebar. | |
| workspaceId | No | AFFiNE workspace id. Omit only when AFFINE_WORKSPACE_ID is configured. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| code | No | ||
| kind | No | ||
| docId | No | ||
| error | No | ||
| stage | No | ||
| title | No | ||
| status | No | ||
| details | No | ||
| folderId | No | ||
| warnings | No | ||
| causeCode | No | ||
| retryable | No | ||
| parentDocId | No | ||
| workspaceId | No | ||
| folderLinked | No | ||
| folderNodeId | No | ||
| linkedToParent | No | ||
| contentPersisted | No | ||
| recoveryGuidance | No | ||
| metadataPersisted | No | ||
| requiresManualRepair | No |