init_plan
Initialize revision-bound context metadata for a document, enabling coordinated multi-agent planning. The returned plan object captures the current document revision so that downstream tools can detect stale edits.
Hints: readOnly — does not modify the document.
Path to the DOCX file.
Human-readable name for the plan. Useful for logging and debugging in multi-agent workflows.
Identifier for the orchestrating agent. Stored in the plan metadata.
merge_plans
Deterministically merge multiple sub-agent plans into a single ordered plan and detect hard conflicts before any edits are applied. Use this before calling apply_plan when multiple agents have independently produced edit plans against the same document.
Hints: readOnly — does not modify any documents.
A hard conflict occurs when two plans attempt to edit the same paragraph in an incompatible way, for example both replacing different text in the same
_bk_* node. Conflicts are reported before apply so you can resolve them without touching the document.Array of plan objects returned by
init_plan or produced by sub-agents. Each object must be a valid plan structure.When
true, return an error immediately if any hard conflict is detected instead of returning a partial merged plan. Defaults to false.When
true, return an error if the plans were not all initialized from the same document revision. Helps prevent merging stale plans.apply_plan
Validate and apply a batch of edit steps to a document in a single call. All steps are validated first; the tool applies them only if every step passes validation. Accepts steps inline or from a JSON file, and is compatible with the output of merge_plans.
Path to the DOCX file.
Inline array of edit steps. Each step requires a
step_id, an operation, and operation-specific fields. Mutually exclusive with plan_file_path.Path to a
.json file containing an array of edit steps. Mutually exclusive with steps.Step structure
Each step is a JSON object with astep_id, an operation (currently replace_text or insert_paragraph), and the parameters required by that operation.
close_file
Close an open document session and release associated resources. Pass clear_all: true with confirm: true to close all open sessions at once.
Path to the DOCX file to close. Provide either
file_path or google_doc_id.Google Doc ID or URL. Extract the ID from the URL:
docs.google.com/document/d/{ID}/edit.When
true, closes all open sessions. Requires confirm: true.Required confirmation flag when using
clear_all. Set to true to proceed.
