docx_get_content
Read document content in various formats. Call this first in any workflow to understand document structure before making edits. Action “blocks” returns structured block data with nodeId, nodeType, textPreview, optional full text when includeText:true, formatting properties (fontFamily, fontSize, color, bold, underline, alignment), and ref handles for immediate use with docx_edit or docx_format. When you need to evaluate or rewrite existing paragraphs or clauses, prefer action “blocks” with includeText:true so you can identify the correct block and then target it by nodeId. Action “text” and “markdown” return the full document as plain text or Markdown. Action “html” returns HTML. Action “info” returns document metadata: word count, paragraph count, page count, outline, available styles, and capability flags. The “blocks” action supports pagination via “offset” and “limit”, and filtering via “nodeTypes”. Other actions ignore these parameters. This tool never modifies the document. Do NOT call docx_edit or docx_format without first reading blocks to get valid refs and formatting reference values.
Parameters
string, enum: 'blocks' | 'extract' | 'html' | 'info' | 'markdown' | 'text'
required
The action to perform. One of: blocks, extract, html, info, markdown, text.
boolean
When true, flattens nested list structures in output. Default: false. Only for action ‘html’. Omit for other actions.
number
Number of blocks to skip. Default: 0. Only for action ‘blocks’. Omit for other actions.
number
Maximum blocks to return. Omit for all blocks. Only for action ‘blocks’. Omit for other actions.
array<any>
Filter by block types (e.g. [‘paragraph’, ‘heading’]). Omit for all types. Only for action ‘blocks’. Omit for other actions.
boolean
When true, includes the full flattened block text in each block entry. Only for action ‘blocks’. Omit for other actions.
string
required
The HERO documentId of the docx to target.