Skip to main content
Glama
SiYuan MCP Server
by MyrkoF

create_document

Create a document or subdocument in a SiYuan notebook from Markdown and get its block ID, which serves as the parent ID for embedding databases inside that doc.

Instructions

Create a document (or subdocument) in a notebook. Use nested path for subdocuments: path:"/Parent/Child". Returns the document block ID — use it as parentDocId in create_database to embed a DB inside this doc.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "notebook": "<notebook>",
      "path": "<path>",
      "title": "<title>"
    },
    "name": "create_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesDocument path (e.g. "/My Doc" or "/Parent/Child")
titleYesDocument title
contentNoMarkdown content (optional)
notebookYesNotebook ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.1

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses that this is a creation operation, explains nested path behavior, and states that a document block ID is returned, but it omits permission requirements, duplicate-path behavior, overwrite semantics, and error conditions.

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 three concise sentences with the core action front-loaded. Each sentence provides useful information: creation scope, nested path syntax, and return-value usage.

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?

For a creation tool with no output schema, the description explains the returned block ID and its purpose. The input schema is fully documented. Some operational details such as duplicate handling and failure modes are missing, but the definition is otherwise complete enough to call correctly.

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 100%, so the schema already documents all four parameters. The description adds useful path nesting semantics and notes how the return value is used, but it does not add details about the title, notebook, or content parameters beyond the schema.

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 states a specific verb and resource: create a document or subdocument in a notebook. It also distinguishes subdocuments via nested paths and clarifies the relationship to create_database.

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?

It explains when to use nested paths for subdocuments and when to use the returned block ID as parentDocId in create_database. It does not explicitly exclude alternatives such as update_document or insert_block, so it stops short of full when/when-not guidance.

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