Skip to main content
Glama
SiYuan MCP Server
by MyrkoF

update_document

Rename a document, replace its body content, or move it under another document or notebook in SiYuan by providing its ID and optional title, content, or parent ID.

Instructions

Rename, replace content, and/or move a document. Provide title to rename, content to replace body, parentId to move under another 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": {
      "id": "<id>"
    },
    "name": "update_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesDocument block ID
titleNoNew title (rename)
contentNoNew markdown content (replaces entire body)
parentIdNoMove doc under this parent document ID (or notebook ID to move to root)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.1

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full disclosure burden; it does usefully warn that 'content' replaces the entire body, which signals a destructive overwrite rather than an append. It says nothing about required permissions, whether the overwrite is recoverable, or what the call returns, leaving a mutation tool's risk profile only half-described.

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: the first states the operations, the second maps each optional parameter to its effect. The verb list is front-loaded and no sentence is wasted.

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?

All four parameters are documented in the schema and the destructive body replacement is noted, so an agent can call the tool correctly. For a mutation tool with no annotations and no output schema, the missing pieces are behavioral rather than structural: permissions, reversibility, and how to distinguish it from update_block.

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 100%, including the notable detail that parentId accepts a notebook ID to move the doc to root, so the schema already does the heavy lifting. The description's parameter mapping largely duplicates the schema text, adding only the framing that fields may be combined, which merits the baseline 3 rather than more.

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?

The description names three specific operations (rename, replace content, move) on a clearly named resource (a document), which is far more than a restatement of the tool name. It does not, however, distinguish this from the sibling update_block tool, which an agent may plausibly confuse with document-level updates since a document is itself a block.

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 phrasing 'and/or' implies the operations can be combined and that at least one optional field should be supplied, which is useful implied usage guidance. There is no explicit when-to-use versus when-not guidance, no mention of alternatives such as update_block or create_document, and no stated prerequisites.

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