Skip to main content
Glama

Edit a Word document

edit_document

Edit DOCX, PDF, ODT, RTF, Markdown, HTML or TXT files without changing originals; replace text, add comments or tracked changes, append content, and save a new edited copy.

Instructions

Edit existing documents (docx, doc, odt, rtf, md, html, txt...) without touching the originals: find and replace (with match case / whole word / wildcards), comments on found text, tracked changes (so every edit is reviewable in Word), accept or reject existing revisions, append content blocks (same blocks as create_document), change properties, page setup and headers / footers, and remove personal information. Saves "_edited." (or the formats asked for) next to each input or in output_dir.

Input Schema

NameRequiredDescriptionDefault
scaleNopng only: pixels per point (default 2 ≈ 144 dpi).
titleNoDocument title (properties).
appendNoBlocks added at the end of the document.
authorNoDocument author; also who tracked changes and comments are by.
footerNoFooter text on every page.
headerNoHeader text on every page.
markupNoPrint Markup: tracked changes marked up and comments beside each page (pdf / png), a comment list (html / md / txt).
suffixNo_edited
formatsNoDefault: the input format (docx for doc).
marginsNo
previewNo
replaceNo
subjectNo
commentsNo
keywordsNo
passwordNodocx only: encrypt the saved document with this password.
input_dirNoEvery document directly in this folder.
overwriteNoReplace existing outputs.
page_sizeNoLetter (default), Legal, A4, A5, Executive...
revisionsNoWhat to do with revisions already in the document (done first).keep
input_pathNo
output_dirNoAbsolute output folder (default: next to the input; required for new documents).
input_pathsNo
orientationNo
output_pathNoAbsolute output file for the first format (its extension must match).
export_pagesNopng only: pages to render, 1-based: "1-3,5" (default all).
page_numbersNoPage numbers in the footer (bottom) or header (top).
track_changesNoRecord the replacements and additions as tracked changes.
remove_personal_infoNoRemove comments, revisions and document properties (Document Inspector).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A3.7/5.0
Behavior4/5

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

Adds real behavior beyond annotations: source files are not modified, output naming convention and location (next to input or output_dir), tracked changes make edits reviewable in Word, existing revisions can be accepted/rejected, and personal-info removal is available. Annotations cover safety (non-readonly, non-destructive, non-idempotent), so the description's contribution is the output-side effect, which it delivers.

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?

One dense but well-ordered paragraph that front-loads the core guarantee ('without touching the originals') before enumerating capabilities, ending with the output-location rule. It is long but nearly every clause names a distinct capability; a bulleted structure would improve scanability.

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 29-parameter, no-required-param mutation tool with no output schema, the description covers the main editing surfaces and the output file convention, but says nothing about return value, preview behavior, or how multiple input_paths/input_dir interact with output naming — gaps the schema alone doesn't close.

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?

With 29 params and only 66% schema coverage, the description usefully maps the conceptual operations to parameter groups: find/replace with match case, whole word, wildcards; comments on found text; tracked changes; accept/reject revisions; append blocks; properties; page setup; headers/footers; remove personal info. It leaves several params (preview, password, export_pages, scale, suffix, formats defaults) undocumented, so not a full 5.

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 (edit existing documents across a listed set of formats) and enumerates the operations it performs, so the agent can tell it apart from create_document (which it references) and convert_document. It stops short of naming the other siblings (get_document_info, extract_text, render_pages) as non-overlapping.

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?

Implicit usage is clear: existing documents only, originals untouched, output written as <name>_edited.<ext>. The mention of 'same blocks as create_document' is a cross-reference rather than routing guidance, and there is no explicit 'use X instead when...' statement.

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