Read a .docx
docx_readRead Microsoft Word .docx paragraphs with 1-based indices before editing. Choose text, outline, or tables mode, page large documents with from/to, and get each paragraph's style.
Instructions
Read a Microsoft Word .docx document and return its paragraphs with 1-based indices.
Use this before docx_edit: the returned paragraph index is the address every edit operation uses.
Each paragraph reports its text, its style id (e.g. Heading1), and whether it sits inside a table.
Runs are merged, so text that Word split across formatting runs still reads as one continuous string.
Modes:
text (default): every paragraph in document order.
outline: only styled paragraphs (headings, titles) — use it for a quick structural overview.
tables: only paragraphs inside table cells.
Large documents are paged: pass from/to to move through them, and check truncated in the result.
This tool only reads. To change the document, follow up with docx_edit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Last paragraph index to return, inclusive (default: from + number of paragraphs that fit). | |
| from | No | First paragraph index to return, 1-based (default 1). | |
| mode | No | text (default) = all paragraphs; outline = styled paragraphs only; tables = paragraphs inside tables. | |
| path | Yes | Path to the .docx file (absolute, or relative to the server root). |