Skip to main content
Glama

find_replace_formatted

Replaces all occurrences of a specified text string in a document with formatted text, applying custom bold, italic, color, and font size.

Instructions

Find all occurrences of a string and replace with formatted text.

Replaces every occurrence of find across all paragraphs in the document with replace, applying the specified character formatting to the replacement run only.

Args: find: Text to search for (must be non-empty). replace: Replacement text. bold: True to bold, False to explicitly un-bold, None to leave unchanged. italic: True to italicise, False to explicitly un-italicise, None to leave unchanged. color: Font color as 6-digit hex (e.g. "FF0000"). None leaves color unchanged. size_pt: Font size in points (e.g. 12.0). None leaves size unchanged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
findYes
replaceYes
boldNo
italicNo
colorNo
size_ptNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the scope (all paragraphs) and that formatting applies only to the replacement run. However, it does not mention whether the operation is reversible, how it handles tracked changes, or what happens if the search string is not found. With no annotations, the description is adequate but not comprehensive.

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 mostly concise with a clear one-sentence summary followed by a structured Args list. It is front-loaded with the purpose. The Args list could be slightly more compact (e.g., inline), but overall it is well-structured and free of fluff.

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?

For a tool with 6 parameters, 0% schema description, and no annotations, the description covers the core functionality well: what the tool does, its scope (all paragraphs), and the expected format for each formatting parameter. It is missing details on edge cases (e.g., empty find string) but an output schema (not provided) may cover return values. Overall, it is sufficiently complete for most use cases.

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

Parameters4/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 lists all parameters with explanations beyond their titles, e.g., specifying that 'color' expects a 6-digit hex string and 'size_pt' is in points. It also notes that 'find' must be non-empty. This adds significant meaning beyond the schema.

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 it finds and replaces text across all paragraphs, applying formatting to the replacement. The verb 'find and replace' combined with 'formatted text' and the scope 'across all paragraphs' makes the purpose distinct from sibling tools like 'replace_text' which likely does simple replacement without formatting.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when formatting is needed, but does not explicitly mention when not to use it or provide alternatives like 'replace_text' for plain text replacement. Usage guidance is only implied, not stated.

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/SecurityRonin/docx-mcp'

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