Skip to main content
Glama

Create Document From Markdown

create_doc_from_markdown

Create a new AFFiNE document by importing markdown content. Optionally embed it into a parent document to make it visible in the sidebar.

Instructions

Create a new AFFiNE document and import markdown content. Use parentDocId to automatically embed the new doc into a parent, making it visible in the sidebar instead of being an orphan.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNo
strictNo
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.
Behavior4/5

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

Annotations show it's a write operation with no idempotency or destructiveness. The description adds value by explaining the embedding behavior (parentDocId) and that the doc would be 'visible in the sidebar instead of being an orphan'. No contradictions with 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?

Two concise sentences front-loaded with the core purpose. Every word adds value, zero fluff.

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 5 parameters and no output schema, the description covers the main function and key parameter (parentDocId). It explains embedding but omits details on error states or title handling. Adequate for a create 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 description coverage is 60% (descriptions for markdown, parentDocId, workspaceId, but not title or strict). The description adds meaning for parentDocId (embedding) but not for title or strict. Baseline 3 is appropriate as the description partially compensates.

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 AFFiNE document from markdown content. It distinguishes from siblings like create_doc (empty doc) and append_markdown (append to existing docs) by specifying importing markdown and optional embedding via parentDocId.

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 guidance on when to use this tool (creating docs with markdown) and mentions a key parameter (parentDocId) for embedding. However, it doesn't explicitly state when to use alternatives like create_doc or append_markdown, leaving some inference to the agent.

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/DAWNCR0W/affine-mcp-server'

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