Skip to main content
Glama
promaray

Documents-MCP-Server

by promaray

edit_doc_contents

Replace specific text within a document by its ID and return the updated content, enabling targeted edits without rewriting the entire file.

Instructions

Edit the contents of a document and return the updated content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYesThe ID of the document that will be edited.
new_strYesThe string to replace the old string with.
old_strYesThe string to be replaced in the document.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
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 notes that the updated content is returned, but omits critical mutation details: what happens if old_str is absent or appears multiple times, whether the edit is reversible, permission requirements, or failure modes.

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?

A single, front-loaded sentence with no padding. The action and the return behavior are stated in minimal space.

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 schema fully documents the three parameters and the description mentions the return value, but with no annotations and no output schema, an agent lacks information about collision/not-found behavior and side effects expected of a content mutation tool.

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 description coverage is 100%, so doc_id, old_str, and new_str are already fully documented in the schema. The description adds no additional parameter semantics beyond what is structured, making the baseline 3 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?

The description states a specific verb and resource ('Edit the contents of a document'), making the tool's purpose immediately clear. However, it does not name or differentiate itself from the sibling read_doc_contents, so an agent gets no explicit signal about which of the two to pick beyond the obvious edit/read contrast.

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 when-to-use guidance, no prerequisites, and no mention of the sibling read_doc_contents as an alternative. Usage is only weakly implied by the word 'Edit'.

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