Skip to main content
Glama
leolulu

siyuan-mcp-server

by leolulu

create_document

Create structured Markdown documents in SiYuan by specifying notebook ID, path, and content. Use fixed paths to batch generate documents.

Instructions

通过 Markdown 创建文档。

适用场景: - 根据固定路径批量创建结构化文档。 - 快速写入一篇完整 Markdown 文档。

使用方法: - notebook_id: 目标笔记本 ID。 - path: 以 / 开头的人类可读路径。 - markdown: 文档 Markdown 正文。

注意事项: - path 必须以 / 开头。 - 思源 API 对相同 path 重复创建不会覆盖已有文档。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
markdownYes
notebook_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.31.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and discloses two important behaviors: paths must start with '/', and re-creating the same path will not overwrite an existing document. This is meaningful behavioral context beyond the obvious 'create' mutation.

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 compact, well-structured into scenarios, usage, and notes. Every line adds useful information, and the most important constraint (path must start with '/') is clearly surfaced in the notes.

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 simple three-parameter create tool, the description covers purpose, parameters, and key edge behavior. Since an output schema exists, return-value details are not required. It could be slightly more explicit about error behavior or what happens when creation fails, but nothing essential is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains all three parameters: notebook_id as target notebook ID, path as a human-readable path starting with '/', and markdown as the document body. This fully covers the parameter semantics.

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 action (create) on a specific resource (document) via Markdown, and lists concrete use cases. It is clearly distinguishable from sibling tools such as update_block or insert_block because it targets whole documents at a given path.

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 provides clear applicable scenarios: creating structured documents at fixed paths and quickly writing complete Markdown documents. It does not explicitly name alternatives or state when not to use this tool, 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.