Skip to main content
Glama

batch

Apply text, paragraph, style, comment, revision, and table-row edits as one all-or-nothing tracked transaction, with dry_run preview to detect conflicts.

Instructions

Apply text.replace, para.insert, para.delete, para.move, style.apply, format.apply, comment.add, comment.reply and comment.resolve together, all or nothing, or table.row.insert and table.row.delete (tracked table rows) together, or style.create/update/rename/merge together, or revision.accept and revision.reject to resolve revisions (by ids, author, address range or all); dry_run previews.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docYesPath to the .docx (live: or the file name of one open in a live app).
opsYesOperations, applied together. Every address refers to the document as read; an operation placed relative to a paragraph another operation deletes or moves is a BATCH_CONFLICT. Kinds: text.replace ['at', 'text']; para.insert ['after', 'before', 'text']; para.delete ['at']; para.move ['after', 'at', 'before']; style.apply ['at', 'style']; format.apply ['align', 'at', 'bold', 'font', 'indent_first_line_cm', 'indent_left_cm', 'indent_right_cm', 'italic', 'line_spacing', 'size_pt', 'small_caps', 'spacing_after_pt', 'spacing_before_pt', 'underline']; comment.add ['at', 'text']; comment.reply ['comment', 'text']; comment.resolve ['comment', 'resolved']; style.create ['based_on', 'custom', 'default', 'id', 'link', 'name', 'next', 'paragraph', 'quick', 'run', 'type']; style.update ['based_on', 'link', 'next', 'paragraph', 'quick', 'run', 'style']; style.rename ['id', 'name', 'style']; style.merge ['from', 'into']; revision.accept ['all', 'at', 'author', 'ids']; revision.reject ['all', 'at', 'author', 'ids']; table.row.insert ['after_row', 'cells', 'table']; table.row.delete ['row', 'table'].
tagNoAppended to the author.
authorNoRevision author.
engineNo`live` edits the document open in Word or LibreOffice (see live.open).
expectNo
dry_runNoPreview only; write nothing.
trackedNoTracked changes (the only mode, true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

readOnlyHint=false is consistent with a mutation tool, and the description usefully discloses atomicity ('all or nothing'), BATCH_CONFLICT semantics, dry_run, and tracked mode. However it omits permissions/auth needs, the live vs file engine implications, and any response/rollback behavior, which matters for a mutation tool. Adds real value but leaves gaps.

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

Conciseness3/5

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

It is a single very dense run-on sentence cramming all batching rules together. Front-loading is partial and there is no structure separating the atomicity rule, valid op groups, and dry_run, making it harder to parse than its length warrants.

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 complex 8-parameter tool with nested objects, no output schema, and atomic mutation semantics, the description covers the key behavioral rules but omits return/response behavior, failure handling beyond BATCH_CONFLICT, and the meaning of the 'tracked' constraint ('the only mode, true'). Adequate but with clear gaps.

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 description coverage is 88%, so the schema already documents the nested op kinds and their parameters in detail. The description echoes the op groups and adds 'by ids, author, address range or all' for revision resolution, but mostly repeats what the schema provides. Baseline 3 is appropriate.

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 names the exact operation groups that can be combined (text.replace, para.insert, comment.add, revision.accept, etc.) and states the core behavior: apply them together, all or nothing, with dry_run previewing. It is clear this is an atomic multi-operation batch tool, though the run-on enumeration makes the central 'batch multiple ops atomically' purpose harder to extract than it should be.

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?

It implies when to use it (grouping related ops that must apply as one unit, or resolving revisions) and mentions dry_run for previews, but it never states when NOT to use it or routes the agent to the many single-purpose siblings (style_update, table_row_delete, etc.). The grouping constraints read ambiguously as either examples or a whitelist of valid combinations.

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