Skip to main content
Glama

word_replace_text

Destructive

Replace literal text in DOCX paragraphs, including strings split across multiple runs. Update the file in place or save changes to a separate output path.

Instructions

Replace literal text in DOCX paragraphs, including text split across multiple runs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
findYes
pathYesAbsolute path or path relative to the server working directory
matchCaseNo
overwriteNo
outputPathNoOptional output path. Omit to update the input file in place.
replacementYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.2

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=false and non-read-only, so the risk profile is covered. The description adds one genuinely useful behavioral detail — that matches spanning multiple runs are handled — but omits whether all occurrences or only the first are replaced, and what happens to the original file.

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 zero filler; the strongest signal (literal replacement in DOCX) comes first and the run-splitting caveat follows.

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 destructive, non-idempotent mutation with 6 parameters, 33% schema coverage and no output schema, the description is under-specified: replacement scope (all vs. first match), in-place vs. outputPath behavior, and the untouched regions of the document are all unexplained.

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 coverage is only 33%: find, replacement, matchCase and overwrite have no schema descriptions, and the description supplies none of them. The default matchCase=true and overwrite=false semantics, and whether replacement can be empty, are left for the agent to guess.

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?

States a specific verb (replace) plus resource (literal text in DOCX paragraphs) and identifies the sibling scope by naming DOCX, which cleanly separates it from powerpoint_replace_text. It does not explicitly contrast with word_native_batch, so it stops short of a 5.

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?

No when-to-use, when-not-to-use, or alternative is given. An agent is not told when to pick this over word_native_batch for edits, or that the tool is limited to paragraph body text rather than headers, footers or tables.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.