Skip to main content
Glama

read_docx

Read-only

Extract text content from DOCX files, preserving tracked changes and comments. Navigate large documents with outline mode for headings or paginated full view.

Instructions

Reads a DOCX file and extracts its text content. Use this to ingest documents into your context window. By default (clean_view=False), it returns text with inline CriticMarkup (e.g., {++inserted++}, {--deleted--}, {==highlighted==}{>>comment<<}) representing Tracked Changes and Comments. Set clean_view=True ONLY if you want to read the final, clean text, ignoring all redlines and comments.

PAGINATION & OUTLINE:

  • mode='outline' returns a structural map of headings with page numbers, styles, table presence, and referenced footnotes. Body content is omitted. Use this first on large documents to plan targeted reads.

  • mode='full' (default) returns the document body. Documents over ~19,000 characters are split into pages; use page=N to read a specific page (1-indexed). Documents under the limit are returned in full on page 1.

  • Page boundaries differ between clean_view=True and clean_view=False.

  • The Structural Appendix (defined terms, anchors, diagnostics) is repeated on every page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the DOCX file.
clean_viewNoIf False (default), returns the 'Raw' text with inline CriticMarkup. If True, returns 'Accepted' text.
modeNo'full' returns body content (paginated for large docs). 'outline' returns a structural heading map with page numbers; body content is omitted.full
pageNoPage number (1-indexed) for mode='full'. Defaults to 1. Ignored when mode='outline'.
Behavior5/5

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

The description adds significant behavioral context beyond the readOnlyHint annotation, including pagination behavior, CriticMarkup handling, page boundary differences between clean_view settings, and mode-specific behaviors. No contradictions with annotations.

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

Conciseness4/5

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

The description is structured with clear sections and front-loaded purpose. It is moderately detailed but every sentence adds value. Could be slightly more concise, but overall well-organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the 4 parameters and no output schema, the description explains input options and return format (text with CriticMarkup, outline structure, pagination). It covers the essential aspects for a read tool, though lacks error scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds meaningful explanations: clean_view explains CriticMarkup vs accepted text, mode explains outline vs full, page explains 1-indexed pagination. This adds value beyond the schema definitions.

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 clearly states 'Reads a DOCX file and extracts its text content', which is a specific verb+resource. It distinguishes between modes and clean_view options. However, it does not explicitly differentiate from sibling tools like diff_docx_files or sanitize_docx, though the purpose is clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use each mode (outline for large documents first, clean_view for final text, page for pagination). It does not state when not to use this tool, but the context is clear enough for an agent to infer appropriate usage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dealfluence/adeu'

If you have feedback or need assistance with the MCP directory API, please join our Discord server