Skip to main content
Glama

Doco Patch Block

doco_patch_block
Idempotent

Update a block in a collaborative document by replacing the whole node or patching attrs/content, with optimistic concurrency versioning to avoid overwrites.

Instructions

更新单个块:提供完整 node 替换,或用 attrs/content 局部修改。带 base_version 做乐观并发校验;不带则自动读取最新版本。409 时请重读合并重试。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeNo完整替换的 tiptap 节点
attrsNo合并进现有 attrs 的字段
contentNo替换块的子内容
block_idYesStable block ID within the target document.
document_idYesTarget document ID.
base_versionNo读取时拿到的 version(强烈建议提供)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

The description adds meaningful behavioral context beyond annotations: it discloses optimistic concurrency via base_version, automatic latest-version reading when base_version is omitted, and 409 conflict handling with re-read/merge/retry guidance. This is consistent with annotations (readOnlyHint=false, idempotentHint=true) and adds value that is not present in the annotation block.

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 brief and front-loaded: the first sentence states the purpose and the two usage modes, the second sentence covers concurrency and error retry. Every sentence delivers essential information without redundancy.

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?

The description covers purpose, usage modes, concurrency handling, and error recovery, with output schema and 100% parameter description coverage filling in the rest. It does not state what happens if no node/attrs/content is provided, but that is arguably a schema or validation concern rather than a description gap.

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

Parameters4/5

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

Schema description coverage is 100%, so parameters are already documented. The description goes further by clarifying base_version's role in optimistic concurrency and the auto-read behavior when absent, plus the distinction between node (full replacement) and attrs/content (partial modification). This is additional semantic value 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 '更新单个块' (update a single block) with a specific verb and resource, and clearly distinguishes two modes: full node replacement vs partial modification via attrs/content. This makes it easy to differentiate from siblings like doco_insert_blocks and doco_delete_block without ambiguity.

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 explicitly explains when to use full node replacement versus partial attrs/content modification, and describes how base_version should be used with a clear fallback to auto-read latest version. It does not explicitly name alternatives or exclusion conditions, but the usage context is clear enough given the sibling list.

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