Skip to main content
Glama

term_rename

Rename a term everywhere in a .docx as one tracked batch and preview changes with counts before writing; options cover whole-word, case, and inflections.

Instructions

Rename a term everywhere as one tracked batch: whole word, case, preserve case and inflections; dry_run previews with counts. Exact unless match_level folds it; then each change says the level it matched at.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesNew term.
docYesPath to the .docx.
tagNoAppended to the author.
fromYesTerm to rename.
authorNoRevision author.
expectNo
dry_runNoPlan and preview only; write nothing.
whole_wordNoWhole words only.
inflectionsNoSuffixes that follow the term: "s" renames Lucías to Elenas; {"from": "o", "to": "a"} renames Lucíao to Elenaa.
match_levelNoFold the search as `find` does: `default` ignores case, accents and punctuation (symbols such as `$` still count), `loose` drops symbols too; `exact` is the rename as without it. When passed, Word's Find codes in `from` are read as their characters, each `preview` change and `skipped` row gains `match_level` (the strictest level it meets) and the reply gains `matches_by_level`, adding up to `counts.matches`. No retry at a looser level. Two meanings of exact: without `match_level` the rename is today's, with ^ codes literal and no levels; `match_level: "exact"` keeps that rule but reads the ^ codes and tags each change (`exact` there: character for character). Not with `case_sensitive` or `ignore_accents: false` at a folded level.
preserve_caseNoLUCÍA becomes ELENA, lucía becomes elena, Lucía becomes Elena.
preview_limitNoMost changes echoed back in `preview`.
case_sensitiveNoExact spelling only; `to` is used as written.
ignore_accentsNo`Lucia` also matches `Lucía`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior4/5

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

With only readOnlyHint=false provided, the description carries most of the burden and does well: it discloses that changes are applied as a 'tracked batch', that dry_run previews with counts and writes nothing, and how match_level folding changes both matching behavior and the returned per-change tagging. It omits auth/permission needs and whether output edits land as Word revisions, but the mutation semantics are substantially covered.

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?

Two dense sentences, front-loaded with the core action and scope, with no filler. The second sentence is somewhat convoluted but every clause conveys matching or output semantics. Appropriately sized for a 14-parameter tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 14-param mutation tool with no output schema and minimal annotations, the description offers partial return-value context (preview, counts, matches_by_level, skipped rows) but never explains the tracked-revision/author/tag or expect.sha256 write-guard semantics. It is adequate but leaves real gaps for a tool this complex.

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

Parameters3/5

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

Schema coverage is 93%, so the schema already documents whole_word, preserve_case, inflections, case_sensitive, ignore_accents, and match_level in detail. The description recaps these ('whole word, case, preserve case and inflections') and adds the summary rule 'Exact unless match_level folds it', but adds little beyond the schema.

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 gives a specific verb and resource ('Rename a term everywhere as one tracked batch'), which clearly distinguishes it from sibling style_rename and from a search tool like find. Scope ('everywhere', 'tracked batch') is stated. It does not name an alternative explicitly, but the what-it-does is unambiguous.

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 guidance on when to use this versus find, style_rename, or batch. The only usage hint is the dry_run preview path, which is a sub-behavior rather than an operating condition. An agent must infer applicability purely from the tool name.

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