Skip to main content
Glama

sanitize_docx

Destructive

Sanitize DOCX files by removing dangerous metadata, track changes, and author info. Produces an audit report of removed content. Use before sharing documents externally.

Instructions

Sanitizes a DOCX file by stripping dangerous metadata (rsids, author names, template paths, DMS metadata, hidden text, orphaned content) and producing an audit report of everything removed. Use this before sending documents to external parties. Supports three modes: full scrub (for signing/closing), keep-markup (preserves your track changes and open comments), or baseline (recomputes your delta against the original document).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the DOCX file to sanitize.
output_pathNoOutput path for the sanitized file. Defaults to <stem>_sanitized.docx.
keep_markupNoKeep existing track changes and open comments. Strips resolved comments and all metadata. Use this when sending a redline to counterparty.
baseline_pathNoPath to the original/baseline document. When provided, the tool recomputes your changes as a clean delta against this baseline. Use when Track Changes was off, or to collapse multiple rounds of markup into a single clean redline.
authorNoReplace all author names on track changes and comments with this value. Used with keep_markup or baseline_path.
accept_allNoAccept all unresolved track changes (full sanitize mode only). Required if the document contains unresolved changes. The report will list every change that was auto-accepted.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Annotations declare destructiveHint: true, and the description reinforces the destructive nature by detailing what is stripped and that an audit report is produced. It adds significant context beyond annotations, such as the three modes and the specific metadata removed. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences plus a short list of modes. It front-loads the purpose, then usage, then modes. Every sentence provides value with no redundancy. Highly efficient.

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?

Given the tool has an output schema, the description does not need to detail return values. It covers the main behavioral aspects (three modes, audit report, metadata stripping). It could mention handling of invalid files or overwrite behavior, but the input schema provides output_path defaults. Still, it is very complete for a complex tool.

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

Parameters5/5

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

Schema description coverage is 100%, but the description enriches parameter meaning by mapping parameters to the three modes (full scrub, keep-markup, baseline). For example, keep_markup corresponds to the keep-markup mode, baseline_path to the baseline mode, and accept_all is used in full scrub. The author parameter is also contextualized.

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 sanitizes a DOCX file by stripping dangerous metadata and producing an audit report. It lists specific items removed (rsids, author names, etc.) and describes three modes, distinguishing it from siblings like accept_all_changes or diff_docx_files.

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?

Explicit usage context is provided: 'Use this before sending documents to external parties.' The three modes give guidance on when to use each (e.g., keep-markup for redline to counterparty). However, it does not directly exclude alternatives or say when not to use; the sibling list provides alternatives but no explicit comparison.

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/dealfluence/adeu'

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