Skip to main content
Glama
rcarmo

office-document-mcp-server

by rcarmo

word_patch_with_track_changes

Replace text in Word documents with track changes enabled, creating revision marks that show deletions and insertions for auditable review.

Instructions

Replace text in a document with Word Track Changes enabled.

Creates revision marks (insertions/deletions) that appear in Word's review mode. Old text is marked as deleted (red strikethrough) and new text is marked as inserted (green underline).

This is useful for:

  • Auditable document changes

  • Review workflows where changes need approval

  • Comparing before/after states in Word

Example: patch_with_track_changes( file_path="04. Artifacts/contoso-sow.docx", replacements={ "": "Contoso Ltd", "": "Cloud Migration", "[TBD]": "Q1 2026" }, author="Solution Architect" )

Args: file_path: Path to the .docx document replacements: Dictionary mapping old text to new text author: Name to attribute changes to (appears in Word's review pane) output_path: Optional output path (defaults to overwriting input)

Returns: Status with replacement counts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the .docx document
replacementsYesDictionary mapping old text to new text
authorNoName to attribute changes to (appears in Word's review pane)
output_pathNoOptional output path (defaults to overwriting input)
Behavior4/5

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

Annotations indicate non-read-only and non-destructive. The description adds context: it creates revision marks (insertions/deletions), can overwrite input, and attributes changes to an author. This provides sufficient behavioral detail beyond annotations.

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 well-organized with a clear opening statement, bullet points for use cases, and a code example. It is concise but could be slightly shorter; still front-loads key information effectively.

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?

With handling of 4 parameters (2 required) and no output schema, the description covers core functionality and provides a comprehensive example. It does not detail error handling or file format constraints, but is sufficiently complete for most contexts.

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 100%, so the schema already documents all parameters. The description reinforces with an example and explains the author parameter's role in Word's review pane, but does not add significant new semantics beyond the schema descriptions.

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 the tool replaces text in a document with Word Track Changes enabled, creating revision marks. It distinguishes from siblings like office_patch by emphasizing auditable changes and review workflows. The verb 'replace text' and resource 'document with Word Track Changes' are specific and purposeful.

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

Usage Guidelines4/5

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

The description lists use cases: auditable changes, review workflows, comparing before/after. These provide clear guidance on when to use the tool. However, it does not explicitly mention when not to use it or alternatives, so a slight gap remains.

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/rcarmo/python-office-mcp-server'

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