Skip to main content
Glama

replace_text

Destructive

Replace specific text in a paragraph using its unique ID, while maintaining original formatting. Works with DOCX and Google Docs.

Instructions

Replace text in a paragraph by bk* id, preserving formatting. Supports DOCX and Google Docs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathNoPath to the DOCX file.
google_doc_idNoGoogle Doc ID or URL (alternative to file_path). Extract from URL: docs.google.com/document/d/{ID}/edit
target_paragraph_idYes
old_stringYes
new_stringYes
instructionYes
normalize_firstNoMerge format-identical adjacent runs before searching. Useful when text is fragmented across runs.
Behavior4/5

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

Annotations already indicate destructiveHint=true, and the description adds that formatting is preserved and the tool supports both DOCX and Google Docs. It does not contradict annotations. However, it omits limitations such as behavior on multiple matches or partial formatting preservation.

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 brief and front-loads the action, but the phrasing 'by _bk_* id' is not optimally clear. It is concise overall, earning a 4.

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?

Given 7 parameters and no output schema, the description fails to explain return values, error handling, behavior on multiple matches, or that it modifies the file. The description is too sparse for a complex tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is low (43%), and the tool description adds no extra meaning for parameters like target_paragraph_id, old_string, new_string, or instruction. The description does not explain what 'instruction' does, leaving ambiguity.

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 'Replace' and the resource 'text in a paragraph', and mentions support for DOCX and Google Docs. However, the phrase 'by _bk_* id' is cryptic and could be clarified as 'by paragraph id'. This slightly reduces clarity.

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?

The description provides no guidance on when to use this tool versus alternatives, nor does it mention when not to use it. There is no context about prerequisites or conflicts with other operations.

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/UseJunior/safe-docx'

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