Skip to main content
Glama

edit_doc

Replace outdated text in a document by matching the exact old string and applying the new content using the document ID.

Instructions

Edit the contents of a document by replacing the old content with new content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYesThe ID of the document to edit.
new_stringYesThe new content for the document.
old_stringYesThe old string of the document, must match including whitespace and punctuation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

There are no annotations, so the description must carry the behavioral burden. It does disclose that the operation replaces old content with new content, which is the core destructive behavior. However, it does not mention side effects, irreversibility, or failure behavior when the old string is not found.

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?

One clear sentence with no filler; the purpose and mechanism are front-loaded in a compact phrase.

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

Completeness3/5

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

For a simple edit operation with fully described parameters, the core is coverednovo. However, there is no mention of error behavior, idempotency, or response, and no usage guidance relative to read_doc, so it is adequate but not complete.

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 coverage is 100%: doc_id, old_string, and new_string each have descriptions, with old_string adding the 'match including whitespace and punctuation' constraint. The tool description itself adds little param detail, so the baseline 3 is appropriate.

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?

Description states a specific action ('Edit the contents of a document') with a defined mechanism ('replacing the old content with new content'). It clearly targets this tool as a modification operation rather than the sibling read_doc, though it never names the sibling.

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

Usage Guidelines2/5

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

No guidance is given about when to choose this tool over the sibling read_doc, nor any conditions, prerequisites, or exclusions. The intent is implied by the verb 'Edit,' but alternatives are not addressed.

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

Install Server

Other Tools