Skip to main content
Glama

Edit doc

edit_doc
Destructive

Edit a doc: rename it (name), replace its whole body (content) or add to the end (append). Changing part of the body means sending the full HTML with the edits; get_doc returns the current one. For when the user asks to change a doc.

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": {
      "doc_id": "<doc_id>"
    },
    "name": "edit_doc"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoRename the doc (its title)
appendNoAdded at the end of the body, keeping what is there
doc_idYesDoc to edit
contentNoReplaces the whole body. Read it with get_doc first and send it back edited

Output Schema

NameRequiredDescriptionDefault
dataYes
actionYes
changedNo
resourceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=false, so the safety profile is known, yet the description still adds real value: it warns that partial body changes require re-sending the full HTML (so an agent cannot do incremental patches) and that content overwrites the entire body. It does not say whether the three edit fields may be combined in a single call or how conflicting fields are resolved, which is the main residual behavioral gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The mode enumeration is front-loaded in the first sentence and the read-before-edit warning follows logically. The closing sentence 'For when the user asks to change a doc' largely restates what 'Edit a doc' already conveys and could be cut or merged with the usage sentence.

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 annotations covering safety, an output schema present, and full schema coverage, the description supplies the remaining decision-relevant context: the edit modes and the full-HTML constraint. The one thing an agent would still want is whether name/content/append can be sent together, which the 'or' phrasing leaves ambiguous.

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, but the description goes beyond the field blurbs by tying the parameters together into distinct edit modes and by stating the HTML round-trip requirement that the content field's schema text only hints at. That cross-parameter meaning is genuinely additive.

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 ('Edit a doc') and immediately enumerates the three modes it supports: rename via name, full-body replace via content, and append. It also names the sibling read tool (get_doc), so an agent can tell this mutation tool apart from the retrieval path without opening a schema.

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?

'For when the user asks to change a doc' gives a clear triggering condition, and 'get_doc returns the current one' tells the agent to read before partially editing the body. It stops short of explicit exclusion guidance such as 'do not use to create a new doc – use create_doc', so it is strong context rather than a full when/when-not decision rule.

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