Skip to main content
Glama

revision_accept

Accept tracked changes in a Word document by IDs, author, paragraph/run, or all and make them plain text. Preview with dry_run or guard against changed files.

Instructions

Accept tracked changes, making them plain text: by ids (from revision.list), by revision author, in a paragraph or run (at, p3#a1b2c3d4..p9#e5f6a7b8), or all. Not itself a tracked change: on the file engine the file is backed up first and the write is logged for history.undo; dry_run previews counts; expect.sha256 refuses a changed file. Use revision.reject to drop changes instead, doc.batch to accept and reject in one write. Returns counts and the revisions resolved.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
atNoParagraph p3#fp or run p3#fp..p9#fp.
allNotrue: every revision in the document.
docYesPath to the .docx (live: or the file name of one open in a live app).
idsNoAccept the revisions with these ids (from revision.list).
authorNoExact revision author.
expectNoWrite guard: the sha256 read earlier (doc.info, or a reply's doc.sha256), e.g. {"sha256": "9f86d081…"}; a file changed since is DOC_CHANGED_ON_DISK.
dry_runNoPreview only; write nothing.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesAlways true on success.
opYesThe operation that ran.
apiYesAPI version (1.0).
docNoThe document read or written: path, sha256 and paragraph count.
nextYesCursor for the next page (pass as cursor), or null.
resultYesWhat the operation returns.
warningsYesThings to know about the result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.7.2
    • addedInput schema / properties / expect / description
      Added value: +"Write guard: the sha256 read earlier (doc.info, or a reply's doc.sha256), e.g. {\"sha256\": \"9f86d081…\"}; a file changed since is DOC_CHANGED_ON_DISK."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "api": {
      +      "description": "API version (1.0).",
      +      "type": "string"
      +    },
      +    "doc": {
      +      "description": "The document read or written: path, sha256 and paragraph count.",
      +      "properties": {
      +        "characters": {
      +          "description": "text.normalize of a text string: its length.",
      +          "type": "integer"
      +        },
      +        "paragraphs": {
      +          "description": "Body paragraphs.",
      +          "type": "integer"
      +        },
      +        "path": {
      +          "description": "Path of the document.",
      +          "type": "string"
      +        },
      +        "sha256": {
      +          "description": "sha256 of the file (pass as expect.sha256 to a write).",
      +          "type": "string"
      +        },
      +        "source": {
      +          "description": "A .txt/.md/.odt source's format, encoding and split mode; \"text\" for a text string (text.normalize).",
      +          "type": [
      +            "object",
      +            "string"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "next": {
      +      "description": "Cursor for the next page (pass as cursor), or null.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "ok": {
      +      "description": "Always true on success.",
      +      "type": "boolean"
      +    },
      +    "op": {
      +      "description": "The operation that ran.",
      +      "type": "string"
      +    },
      +    "result": {
      +      "description": "What the operation returns.",
      +      "properties": {
      +        "accepted": {
      +          "description": "Revisions accepted.",
      +          "type": "integer"
      +        },
      +        "address_map": {
      +          "description": "Old address -> new address of every paragraph whose address changed.",
      +          "type": "object"
      +        },
      +        "applied": {
      +          "description": "Edits applied (a count), or for style kinds one entry per style op.",
      +          "type": [
      +            "integer",
      +            "array"
      +          ]
      +        },
      +        "backup": {
      +          "description": "Path of the backup taken before the write.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "dry_run": {
      +          "description": "True when nothing was written (a preview).",
      +          "type": "boolean"
      +        },
      +        "footprint": {
      +          "description": "Part name -> the paragraphs or items it touched in that part.",
      +          "type": "object"
      +        },
      +        "merged_paragraphs": {
      +          "description": "Paragraphs joined by resolving paragraph marks.",
      +          "type": "integer"
      +        },
      +        "op_id": {
      +          "description": "Undo-log id of this write (history.undo / history.restore).",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "preview": {
      +          "description": "One entry per edit: what changes where.",
      +          "items": {
      +            "description": "A previewed edit.",
      +            "properties": {
      +              "action": {
      +                "description": "accept or reject (revision kinds).",
      +                "type": "string"
      +              },
      +              "after": {
      +                "description": "Text after.",
      +                "type": "string"
      +              },
      +              "at": {
      +                "description": "Where it applies.",
      +                "type": "string"
      +              },
      +              "before": {
      +                "description": "Text before.",
      +                "type": "string"
      +              },
      +              "op": {
      +                "description": "Index of the edit in ops.",
      +                "type": "integer"
      +              },
      +              "revisions": {
      +                "description": "Revisions it resolves (revision kinds).",
      +                "type": "integer"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "rejected": {
      +          "description": "Revisions rejected.",
      +          "type": "integer"
      +        },
      +        "revisions": {
      +          "description": "The revisions resolved (capped; see revisions_omitted).",
      +          "items": {
      +            "description": "A resolved revision.",
      +            "properties": {
      +              "action": {
      +                "description": "accept or reject.",
      +                "type": "string"
      +              },
      +              "at": {
      +                "description": "Paragraph address.",
      +                "type": "string"
      +              },
      +              "author": {
      +                "description": "Its author.",
      +                "type": "string"
      +              },
      +              "id": {
      +                "description": "Revision id.",
      +                "type": "string"
      +              },
      +              "type": {
      +                "description": "Revision type (insert, delete, mark_insert, format...).",
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "revisions_omitted": {
      +          "description": "Resolved revisions left out of the list.",
      +          "type": "integer"
      +        },
      +        "sha256": {
      +          "description": "sha256 of the file after the write (pass as expect.sha256 next).",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "warnings": {
      +          "description": "Notes on what the write could not do as asked.",
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "applied",
      +        "dry_run"
      +      ],
      +      "type": "object"
      +    },
      +    "warnings": {
      +      "description": "Things to know about the result.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "api",
      +    "ok",
      +    "op",
      +    "result",
      +    "warnings",
      +    "next"
      +  ],
      +  "type": "object"
      +}
  2. Addedv0.1.3

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already mark this as a non-read-only, non-destructive, closed-world write; the description goes well beyond that by disclosing that the file is backed up first, the write is logged for history.undo, dry_run previews counts, and expect.sha256 refuses stale files (DOC_CHANGED_ON_DISK). These are the operational details an agent needs before mutating a document.

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?

Front-loaded with the core action, then selection modes, then safety/guard semantics, then siblings. Every clause carries distinct information (selector sources, backup/log behavior, preview, hash guard, alternatives) with no filler.

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

Completeness5/5

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

For a 7-parameter mutation tool with nested objects, an output schema, and safety annotations, the description covers selection semantics, write-guard behavior, preview mode, and sibling routing. Nothing essential to correct invocation is missing.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not: it tells the agent where ids come from (revision.list), that author matching is exact, gives a concrete range example format, and explains the dry_run/expect behaviors that map to those params. It stops short of fully documenting every parameter, but exceeds the schema-only baseline.

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?

States a specific verb and resource ('Accept tracked changes, making them plain text') and immediately enumerates the four selection modes (ids, author, at-range, all). It also names the sibling revision.reject as the inverse operation, so an agent can distinguish it without opening either schema.

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

Usage Guidelines5/5

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

Explicitly routes to alternatives with conditions: 'Use revision.reject to drop changes instead, doc.batch to accept and reject in one write.' Combined with the enumerated selection modes, the agent knows both when to pick this tool and when not to.

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