Skip to main content
Glama

propose_replace_text

Stage a text replacement within a specific document block range, with preview before applying. Excludes table cells for safe, precise edits in Markdown and Word documents.

Instructions

Stage replacing character range [start:end) inside one block.

Offsets come from find_text or read_document. The staged change includes before/after previews; nothing is written until apply_changes. Table cells are not supported (delete/re-insert the table instead).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endYes
pathYes
textYes
startYes
doc_hashNo
element_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries full behavioral burden. It discloses that nothing is written until 'apply_changes,' reveals the staging behavior ('staged change includes before/after previews'), and states a clear limitation (table cells not supported). This is sufficient for a non-destructive staging 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 three concise sentences with no fluff. The core purpose is front-loaded, followed by essential offset provenance and a critical limitation. Every sentence earns its place.

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

Completeness4/5

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

The description covers the essential operational details: staging behavior, previews, offset source, and unsupported case. Since an output schema exists, return format need not be described. The only gap is the unexplained role of 'path' and 'doc_hash,' but overall it is sufficiently complete for an agent to invoke the tool 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?

The schema has 0% description coverage, so the description must compensate. It clarifies start/end as offsets and text as replacement content, and implies element_id is the block. However, it does not explain 'path' or 'doc_hash,' which remain semantically ambiguous. The added value is partial.

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 tool's purpose: 'Stage replacing character range [start:end) inside one block.' It identifies the specific verb (stage replace), the resource (one block), and the exact range semantics. It naturally distinguishes from siblings like propose_insert_block and propose_delete_block by specifying 'replacing'.

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 provides concrete usage context: offsets derive from 'find_text or read_document,' and it explicitly notes that table cells are unsupported with a suggested alternative ('delete/re-insert the table'). However, it does not explicitly compare against insertion or deletion siblings, leaving some inference to the agent.

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/xyyyang97/doc-agent-mcp'

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