Skip to main content
Glama

Edit Doc content

edit_doc_content
Destructive

Apply targeted Markdown edits to a doc after reading its current content. Prefer exact text or block edits; preserve unrelated content. Full rewrites and large removals are checked by the collaborative editor. Set allowRemoval only for a user-requested removal. Re-read after a conflict; never blindly retry. Preserve requestId on retries.

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": {
      "requestId": "<requestId>",
      "id": "<id>",
      "edits": "<edits>"
    },
    "name": "edit_doc_content"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesExisting target ID returned by the matching list, read or search tool. Preserve any search type prefix. Do not invent IDs.
editsYes1–20 targeted edits, at most 50,000 characters total.
requestIdYesA unique UUID for this intended action. Reuse it unchanged when retrying the same action.
allowRemovalNoTrue only when the user explicitly requested the removal of existing content.

Output Schema

NameRequiredDescriptionDefault
editYesEdworking record fields permitted for this connection.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=false→true and idempotentHint=false, and the description adds real value beyond that: collaborative-editor checks on large removals, re-read-after-conflict behavior, no blind retry, and requestId reuse as a retry key. It does not cover failure modes or how partial-edit failures surface, so it stops just short of full disclosure.

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?

Six short sentences, front-loaded with the action and precondition, then constraint, guardrail, and retry behavior. Every sentence carries operational information with no filler.

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?

An output schema exists, so return values need not be explained, and the description covers the mutation workflow, removal guardrail, and conflict/retry handling. It leaves the read step unnamed despite depending on it, which is the one gap for a destructive edit 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 all four parameters are already documented, establishing a baseline of 3. The description reinforces two of them – allowRemoval scope and requestId reuse on retries – but adds limited new meaning beyond the schema text.

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 states a specific verb and resource: applying targeted Markdown edits to a doc, with the precondition of reading its current content first. It does not name or explicitly distinguish itself from siblings such as update_doc or get_doc, so the reader must infer which sibling performs full rewrites.

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?

Clear guidance on when to prefer exact-text or block edits over rewrites, and an explicit rule that allowRemoval is only for user-requested removals. Missing is direct routing language naming the alternative tool for full rewrites or for the read step, leaving the comparison implicit.

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.