Skip to main content
Glama

Create Document From Markdown

create_doc_from_markdown

Creates a new AFFiNE document by importing Markdown as native blocks, including equations, and can embed it under a parent doc or place it in a folder.

Instructions

Create a new AFFiNE document and import Markdown as native blocks, including $$...$$ equation blocks and $...$ inline equations. Use parentDocId to embed the new doc into a parent, or folderId to place it in an organize folder.

Input Schema

NameRequiredDescriptionDefault
titleNo
strictNo
folderIdNoOptional folder ID to place the doc in. Use list_organize_nodes to find folder IDs.
markdownYesMarkdown content to import
parentDocIdNoIf provided, the new doc is automatically embedded into this parent doc as a linked child (visible in sidebar).
workspaceIdNoAFFiNE workspace id. Omit only when AFFINE_WORKSPACE_ID is configured.

Output Schema

NameRequiredDescriptionDefault
okNo
codeNo
kindNo
docIdNo
errorNo
lossyNo
stageNo
statsNo
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

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly=false, destructive=false, and openWorld=true, so the safety profile is covered. The description adds valuable beyond-schema behavior: the Markdown is converted into native blocks and $$...$$ / $...$ equations are preserved. It does not mention required permissions or side effects on a parent doc.

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?

Two tight sentences with the core action and equation caveat front-loaded, followed by the placement options. No wasted prose.

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

Completeness3/5

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

An output schema exists so return values need no explanation, and the create-and-import behavior is covered. However, `strict` semantics and workspace/permission preconditions are absent, which matters for a mutating, open-world tool.

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 coverage is 67%, and the description mostly restates what the schema already documents for parentDocId, folderId, and markdown. The `strict` flag, which materially changes parsing behavior, is undocumented in both the schema and the description.

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

Purpose4/5

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

States a concrete verb (create) and resource (AFFiNE document) plus the distinctive mechanism: importing Markdown as native blocks, including equation handling. It is clear, but it never names the sibling alternatives it differs from (create_doc, create_semantic_page, append_markdown, replace_doc_with_markdown), so differentiation is left implicit.

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

Usage Guidelines3/5

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

The second sentence gives conditional guidance for two parameters (use parentDocId to embed, folderId to place), but that is parameter selection, not tool selection. There is no statement about when to use this instead of create_doc or append_markdown, and no exclusions.

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