Skip to main content
Glama

apa7_replace_text

Replaces exact text fragments in Microsoft Word .docx files to correct wording or citations using find-and-replace pairs, with optional output path, overwrite, and tracked-change acceptance.

Instructions

Reemplaza fragmentos exactos: replacements=[{find, replace}] (correcciones de redacción o de citas).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file_path": "<file_path>",
      "replacements": "<replacements>"
    },
    "name": "apa7_replace_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_pathYes
overwriteNo
output_pathNo
replacementsYes
accept_tracked_changesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.5.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden, but it only signals that matching is exact. It says nothing about which file is written, what overwrite/output_path do, whether tracked changes in the document interact with the replacement, or what happens when a find string is absent. The only real behavioral hint is 'exactos', which usefully implies no regex or fuzzy matching.

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 compact sentence, front-loaded with the action and immediately followed by the argument shape. Nothing is redundant. The terseness borders on under-specification rather than excess, so it is efficient but slightly cryptic for a mutation 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?

With 5 parameters, zero annotation coverage, no output schema, and no description of the file-mutation semantics, the definition is under-powered for a tool that edits documents in place. An agent can guess the core call but cannot confidently decide about overwrite, output_path, or accept_tracked_changes, nor predict failure when a find string does not match.

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 0% across 5 parameters, and the description documents only one of them, replacements, though it does so with a helpful inline shape. file_path, output_path, overwrite (default false), and accept_tracked_changes are entirely unexplained in both schema and description. That leaves the highest-risk parameters, the write-destination and tracked-changes switches, undocumented.

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 and resource: 'Reemplaza fragmentos exactos', and shows the payload shape replacements=[{find, replace}]. It narrows intent to exact text substitution with editing/citation corrections, which explains how it differs in spirit from broader formatting siblings. It stops short of explicitly distinguishing itself from apa7_replace_references, and 'de citas' actually muddies the boundary.

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 parenthetical '(correcciones de redacción o de citas)' implies the intended use case, so usage is inferable. There is no explicit when-to-use vs when-not guidance, no mention of apa7_replace_references as the structured alternative, and no prerequisites. Guidance is implied rather than stated.

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