Skip to main content
Glama

Get DOCX contents

get_contents_from_docx
Read-only

Retrieve paginated paragraphs and tables from DOCX files. Loop with offset and limit until all content is fetched.

Instructions

Read a paginated batch of content blocks (paragraphs and tables) from a .docx file. Returns items, total, offset, limit, and has_more — loop with increasing offset until has_more is false. Blocks carry style name references only; use get_styles_from_docx for full style definitions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the .docx file. Provided by the MCP client in each tool call, not in server build or MCP host config.
offsetNoZero-based index of the first content block to return.
limitNoMaximum blocks per batch (1-200, default 10).
Behavior5/5

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

Annotations declare readOnlyHint=true, consistent with reading. The description adds important behavioral details: the return structure includes items, total, offset, limit, has_more; blocks carry only style name references (not full styles). This goes beyond annotations.

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

Conciseness5/5

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

The description is two sentences, front-loaded with the main action, and every sentence provides essential information. No redundant or superfluous content.

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

Completeness5/5

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

Given the absence of an output schema, the description adequately describes the return values and pagination behavior. It also references the sibling tool for styles. Annotations provide readOnlyHint, and the description fills in remaining behavioral context.

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 description coverage is 100%, so the baseline is 3. The description adds context by explaining how offset and limit are used for pagination, and clarifies that file_path is provided by the MCP client, which adds value beyond the schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Read', the resource 'content blocks (paragraphs and tables) from a .docx file', and specifies pagination. It distinguishes from sibling tool get_styles_from_docx by noting that style definitions are separate.

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

Usage Guidelines5/5

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

The description explains when to use this tool: to read a paginated batch. It provides explicit pagination instructions (loop with increasing offset until has_more is false) and directs the agent to use get_styles_from_docx for full style definitions, which is an explicit alternative.

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/gossipauthorxpm/docs-mcp'

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