Skip to main content
Glama
IDHaunter

MCP Chat

by IDHaunter

edit_document

Replace specific text in a document with new content by specifying the document ID, the exact old string, and the replacement text.

Instructions

Edit a document by replacing a string in the documents content with a new string

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYesId of the document that will be edited
new_strYesThe new text to insert in place of old text
old_strYesThe text to replace. Must match exactly, including whitespaces.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the operation and does not mention side effects (e.g., persistence, overwriting), failure conditions (e.g., old_str not found), or whether the edit applies to all occurrences. This is a minimal disclosure for a mutating operation.

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 a single, efficient sentence with no fluff. The core action and resource are front-loaded, and every word contributes to understanding the tool's purpose.

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?

The tool is relatively simple (3 required string params, no output schema). The description covers the essential operation, but it omits behavioral details like what happens if old_str is not found or if multiple matches exist. For a mutating tool without annotations, this is a minor but noticeable gap.

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%, so all parameters have descriptions in the schema. The description itself adds no new semantic detail beyond what the schema already provides; it just reiterates the replace action. This meets the baseline for high coverage.

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 clearly states the action (edit), the resource (a document), and the specific operation (replacing a string with a new string). This is a specific verb+resource that distinguishes it from the sibling tool read_doc_contents, which is focused on reading.

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

Usage Guidelines3/5

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

The description implies usage (when you need to modify content) but provides no explicit guidance on when to use this tool versus the sibling read_doc_contents, nor does it mention any prerequisites or exclusions. The context is clear but lacks differentiation.

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

Deploy Server

Other Tools