Skip to main content
Glama

Update Page Content

update_page_content

Replace, append, or prepend Markdown content in a Docmost page body via collaboration WebSocket, persisting changes even when the REST API cannot.

Instructions

Writes into the body of an already-created page.

Docmost's REST API cannot do this — the body lives in the Yjs collaboration server — so this tool opens the collaboration WebSocket, edits the document and waits for it to be persisted (~13 s).

Unlike /pages/update, which accepts an operation field and ignores it, mode genuinely works here:

  • "replace" (default): the page ends up with exactly this Markdown.

  • "append": keeps what is there and adds this at the end.

  • "prepend": keeps what is there and adds this at the start.

The Markdown is converted with Docmost's own converter, so it supports its whole schema: headings, bold, italics, code, lists, tables, blockquotes, code blocks, etc.

Requires the yjs extra (uv sync --extra yjs).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo`"replace"`, `"append"` or `"prepend"`.replace
page_idYesUUID or slugId of the page to edit.
markdownYesContent to write, in Markdown.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.9/5.0
Behavior5/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 does so thoroughly. It discloses that the tool opens a collaboration WebSocket, waits for persistence for ~13 seconds, replaces/appends/prepends content exactly as described, and converts Markdown using Docmost's own converter. It even mentions the required yjs extra, going well beyond the schema.

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 front-loaded with the core action, then efficiently explains the mechanism, latency, comparison to the sibling, mode behavior, and dependency. The bullet list for modes is scannable and every sentence adds necessary context; there is no filler or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool involving WebSocket communication, persistence delay, multiple modes, and a dependency, the description covers everything an agent needs to invoke it correctly: what it does, how it works, why it differs from alternatives, what the modes mean, and the installation requirement. An output schema exists, so return value details are not the description's responsibility.

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 the baseline is 3. The description adds meaningful semantics by explaining the three mode values in detail and their real behavioral differences, including that 'replace' yields exactly the given Markdown. This goes beyond the schema's terse parameter descriptions.

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 opens with a specific verb and resource: 'Writes into the body of an already-created page.' It then distinguishes the tool from the sibling update_page by explaining that the REST API cannot perform this operation and that mode genuinely works here. This makes the tool's unique purpose unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly contrasts this tool with '/pages/update', noting that the REST API cannot edit page bodies and that the alternative ignores its operation field. It clearly implies that this tool is the correct choice when the body content itself needs to be changed, while naming the sibling it is not.

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