Skip to main content
Glama
SiYuan MCP Server
by MyrkoF

delete_document

Deletes a SiYuan document by block ID, with optional dry-run preview and cascade removal of child documents.

Instructions

Delete a document. Use dryRun:true to preview without deleting. Set cascade:true to also delete child documents.

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": "delete_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesDocument block ID
dryRunNoPreview only, no deletion (default: false)
cascadeNoAlso delete children (default: false)

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, the description carries the full burden. It usefully discloses the preview mode and the cascading-delete behavior, which is real behavioral context beyond the schema. However, it omits the most important trait for a destructive operation: whether deletion is permanent or recoverable (e.g., trash), and what happens to backlinks or references.

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?

Three short sentences, front-loaded with the core action, each covering a distinct option. No filler or redundancy.

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?

For a destructive 3-parameter tool with no annotations and no output schema, the definition covers the parameters and the safety preview but leaves gaps around irreversibility, recovery, and behavior when children exist without cascade. It is adequate but not complete.

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%, so all three parameters are already documented, including defaults. The description's mention of dryRun and cascade restates schema content without adding format, constraints, or interaction semantics, so the baseline 3 applies.

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?

"Delete a document" is a specific verb plus resource, and the resource is distinguishable from siblings like delete_db_rows and delete_view. It does not explicitly contrast itself with those siblings, so it falls short of a 5.

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 description explains the two usage modes (dryRun preview, cascade for children), which is genuine when-to-use guidance for its options. It gives no guidance on when to prefer this tool over sibling deletion tools, nor any prerequisites or preconditions.

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