Skip to main content
Glama

edit_document

Replace a specified string in a document with a new string, using the document ID to target the file.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYesThe ID of the document to edit.
new_stringYesThe new string to replace the old string with.
old_stringYesThe string to be replaced in the document.
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 only states the replace action without explaining what happens if old_string is not found, whether all occurrences are replaced, or side effects. 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.

Conciseness5/5

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

The description is a single sentence that directly states the function with no wasted words. It is front-loaded with the primary action and appropriate for a simple tool.

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?

This is a mutation tool with no annotations and no output schema, so the description must explain behavior on its own. It lacks critical details such as error handling, replacement scope (first vs. all occurrences), and reversibility, making it incomplete for confident invocation.

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 provides complete descriptions for all three parameters (doc_id, old_string, new_string) at 100% coverage. The description adds no additional semantic detail beyond what the schema already states, meeting the baseline for high schema 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 uses a specific verb ('Edit') and names the resource (document) plus the action (replacing a string), which clearly distinguishes it from the sibling read_doc_contents. This is a precise, non-tautological statement of purpose.

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?

The description implies usage for modifying document content (as opposed to reading), providing clear context. However, it does not explicitly mention exclusions or name the alternative read_doc_contents, so it stops short of full explicit guidance.

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/akritiAgrawal27/mcp_cli_chatbot'

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