Skip to main content
Glama

replace_text

Replace a word or phrase everywhere in a PDF while preserving the document's embedded fonts instead of drawing an overlay. Set old/new text, page range, and whole-word or case-sensitive matching.

Instructions

Replace a word or phrase everywhere it appears, rewriting the text itself in the document's own embedded fonts (not a white box drawn on top).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
newYes
oldYes
pathYes
pagesNo
outputYes
overwriteNo
whole_wordNo
case_sensitiveNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.2

TDQS

B3.1/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false, destructiveHint=false, and openWorldHint=false, so safety is partly covered, but the description adds genuinely useful behavior: the output is re-typeset in the document's own embedded fonts rather than covered by a white box, which affects searchability and visual fidelity. It omits failure modes (e.g. what happens when the string is absent or fonts are unembeddable), keeping it from a 5.

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?

A single front-loaded sentence with a clarifying parenthetical; there is no filler or repetition. It is well-formed as prose, though arguably too terse for an 8-parameter mutating 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?

An output schema exists, so return values need not be described, but with 8 parameters at 0% schema coverage, no usage guidance, and ambiguous path-vs-output and overwrite semantics, the description leaves major gaps for an agent to call this correctly. It is adequate only for the core intent.

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 0% across 8 parameters, so the description carries the full burden and does not meet it. It never explains path vs output, overwrite, pages scoping, whole_word, or case_sensitive, and its phrase 'everywhere it appears' obscures the existence of a per-page restriction parameter. Only the old/new semantics are loosely implied.

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 names a specific verb (replace) and resource (a word or phrase everywhere it appears) and clarifies the mechanism — rewriting embedded fonts rather than drawing an overlay — which implicitly distinguishes it from overlay-based siblings like redact. It is clear what the tool does, though it never names a sibling outright.

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 exclusions, and no routing to alternatives such as redact or find_sensitive_data, which are natural competitors for text removal in this sibling set. The agent is left to infer applicability from the mechanism clause alone.

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