Skip to main content
Glama

Edit document

edit-document
Destructive

Edit a document by exact text replacement. old_string must match exactly once against the document as it currently stands (read it first with get-document). The edit lands in the document immediately — anyone with it open sees it — but is NOT published: it reaches repos only when publish-document is called.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentYesThe document target (find it with list-documents)
new_stringYesThe replacement text
old_stringYesThe exact text to replace — must match the document exactly once, including whitespace

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations (destructiveHint=true, readOnlyHint=false): it discloses that the edit takes effect immediately for anyone viewing the document, that it is NOT published until publish-document runs, and that old_string must match exactly once as the document currently stands. The live-vs-published distinction is critical behavioral context an agent would otherwise guess at.

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 tight sentences, front-loaded with the operation, then the precondition, then the publish semantics. No filler or 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?

With no output schema, the description covers the operation, precondition, and side effects well. It does not state what happens when old_string matches zero or multiple times (failure mode) or what the tool returns, which is a modest gap for a mutation tool.

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 the schema already documents all three parameters, including the exactly-once and whitespace constraints on old_string. The description largely restates that constraint, adding only the 'as it currently stands' framing, which is marginal added meaning. Baseline 3 applies.

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?

States a specific verb+resource+mechanism: 'Edit a document by exact text replacement.' An agent can immediately distinguish this from edit-mockup (different resource) and from create-document/publish-document (different operations).

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?

Names prerequisites and routing explicitly: read first with get-document, and the edit only reaches repos when publish-document is called. This tells the agent both when to use this tool and which sibling handles the follow-up step.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources