Skip to main content
Glama

edit-document

Replace a specified text string in a document with new content.

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 the old text
old_strYesThe text to replace, Must match exactly, including whitespace
Behavior2/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 indicates a mutation operation ('Edit') but does not state whether changes are permanent, whether write permissions are required, or what happens if the old string is not found. It also leaves ambiguous whether all occurrences are replaced or just the first. This is a significant gap for a mutation tool.

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 description is a single concise sentence that front-loads the main action. It is efficient and to the point, though it has a minor grammatical issue ('documents content'). It earns a 4 because it is appropriately sized and immediately understandable.

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 simple replace operation with fully described parameters, the description is fairly minimal. But it lacks critical behavioral details: it does not specify whether replacement is global or first-occurrence, what the return value is, or error handling when the old string is absent. Since there is no output schema and no annotations, these gaps make the tool incomplete for an agent to predict behavior accurately.

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?

The input schema has 100% coverage with each parameter described (doc_id, old_str, new_str). The description does not add any semantic value beyond what the schema already provides, so it stays at the baseline of 3. The schema handles the parameter documentation adequately.

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 a specific verb ('Edit') and resource ('document') with a specific action ('replacing a string... with a new string'). It distinguishes from the sibling read_doc_contents, which is a read operation, so an agent can easily tell them apart.

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 (you edit when you need to replace text), but it provides no explicit guidance on when to use this tool versus the sibling read_doc_contents, nor any exclusion criteria or prerequisites. The context is clear enough for a simple tool, but explicit 'when not' guidance is missing.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dani-tc/anthropic-mcp-chat'

If you have feedback or need assistance with the MCP directory API, please join our Discord server