Skip to main content
Glama

edit_document

Replace an exact string in a document with new text using its doc_id. Update document content precisely, including whitespace, to fix or modify specific passages.

Instructions

Edit a document by replacing a string in document's content with 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 the old text.
old_strYesThe text to replace. Must match exactly, including whitespace.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/5.0
Behavior1/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It fails to mention whether the edit is in-place, what happens if 'old_str' is not found or matched multiple times, whether the operation is destructive/reversible, or what permissions are needed. The description only restates the basic 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, well-structured sentence that front-loads the action and resource. It is concise with no wasted words.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is incomplete. It omits critical behavioral details such as matching rules, potential failures, and side effects, leaving the agent under-informed about how to invoke it correctly.

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 the baseline of 3 applies. The description adds no parameter details beyond what the schema already provides (e.g., exact match requirement is in the schema). It doesn't clarify matching semantics or error cases.

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 clearly states the verb ('Edit') and resource ('a document') and specifies the mechanism: replacing a string with a new string. This distinguishes it from the sibling 'read_doc_contents', which is a read operation. However, it doesn't explicitly name the alternative, so it falls short of a 5.

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?

There is no guidance on when to use this tool versus alternatives. The sibling tool 'read_doc_contents' implies a read-vs-write distinction, but the description doesn't state when editing is appropriate or any prerequisites (e.g., document must exist, permissions).

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