Work with a live Word document through MCP
Share an open Word document with an external AI agent, read sections and exact text, and apply version-safe edits that can arrive as tracked changes.
Last verified: 2026-10-06
Deckary's live document tools let an external AI agent work with the document currently open in Word. Sharing is opt-in for each open document, and every change is executed by the Deckary add-in inside the live document. The tools and safety rules are the same as for live PowerPoint; this page covers what is specific to Word.
Start a live session
- Open the document in Word and open the Deckary task pane.
- Sign in with the same Deckary account used during MCP authorization.
- Turn on MCP sharing in the Deckary AI pane.
- Ask the agent to call
list_live_documentsand select the session whosekindisword.
Read the document
read_live_document without targets returns the outline: the heading tree with a handle for each heading section (hd_…), the number of body blocks, the document's styles, whether changes are being tracked, the comments with a handle each (cm_…), and the current selection.
Pass targets for exact content. hd_… returns a heading section, bk_… one block, and bk_…..bk_… a span of blocks. Each block has a handle, its kind (paragraph, heading, list item, or table), its style, list state, and exact plain text.
Inspect runs, tables, and comments
inspect_live_objects returns the exact runs and paragraph formatting of a block (bk_…), including links and tracked revisions; the cells of a table (tb_…, optionally windowed such as tb_…!A1:C9); and a comment with its replies and anchor (cm_…).
Render pages
render_live_document returns Word's own layout as page images. Pass pg_3 for page 3, or block, span, and heading locators to receive the pages that contain them; each image lists which requested locators were found on it. At most four pages per call.
Edit one bounded part per call
author_live_document takes one Document DSL program, which starts with document { edit. One program can insert blocks, replace blocks or a heading section, patch existing blocks, delete blocks, and add comments. It touches at most 40 existing blocks and writes at most 80 new ones.
document {
edit
insert [{after:bk_9f,blocks:[{type:heading,level:2,text:"Risks"},{type:list,list:bullet,items:[{text:"Vendor A: 62%"},{text:"Vendor B: 21%"}]}]}]
patches [{target:bk_a31,edits:[{find:"Q3",replace:"Q4"}]}]
review tracked
}
Before the first write, have the agent call describe_authoring_vocabulary with the topics live_documents, word_dsl, and word_program_body.
Word-specific rules:
review trackedrecords the program's changes as tracked revisions that you can accept or reject in Word, then restores your tracking setting. Without it, the document's current tracking mode applies.editsare literal, case-sensitive replacements inside one block; unchanged text keeps its formatting. Preflight rejects an edit whose text does not occur.- Built-in styles are named with language-independent keys such as
heading2orquote, so the same program works in every Word language. Other styles use their exact names from the outline. - Text is literal. Markdown markers are written as text, so structure and emphasis come from blocks and runs.
- The result returns the affected blocks with fresh handles and exact text, plus the Word pages that contain them.
The version check, applied, version_conflict, and settlement_unknown rules are the same as for PowerPoint. The Deckary AI pane in Word uses the same program and the same checks, and the two never write to a document at the same time.
Know when the session ends
The session ends when you turn off sharing, sign out, close the Deckary pane, or lose the connection. A newly loaded pane always starts with sharing off.