Skip to main content
Glama
pdf4me
by pdf4me

Extract Text from Word

extract_text_from_word

Extract text from Word documents with optional page ranges and filters for comments, headers/footers, and tracked changes, saving both text and metadata.

Instructions

Extract text from a Word document via PDF4me /api/v2/ExtractTextFromWord. Supports page range and content filtering options (comments, header/footer, tracked changes). Saves extracted text and JSON response metadata to disk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
output_dirNo
accept_changesNo
word_file_pathYes
end_page_numberNo
remove_commentsNo
output_file_nameNo
request_doc_nameNo
start_page_numberNo
remove_header_footerNo
Behavior3/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It mentions the API endpoint and the side effect of saving extracted text and JSON metadata to disk, but it omits important traits like authentication requirements, rate limits, whether the source file is modified, and the exact structure of the returned response.

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-loading the purpose and then listing key options and the side effect. There is no redundant or filler content—every sentence contributes useful information.

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

Completeness2/5

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

Given the absence of annotations, no output schema, and nine parameters, this description is too sparse. It does not cover return values, file naming conventions, error handling, supported Word formats, or how the filtering options interact with each other. The disk-save behavior is mentioned, but the overall context for a complex tool is incomplete.

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

Parameters2/5

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

Schema description coverage is 0%, so the description is the only source of parameter meaning. It mentions page range and content filtering options (comments, header/footer, tracked changes) which map to some parameters, but it does not explain output_dir, output_file_name, request_doc_name, or the precise behavior of accept_changes and page numbering. This is insufficient for a nine-parameter tool.

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 identifies the action ('Extract text'), the resource ('a Word document'), and the specific API endpoint. It distinguishes itself from siblings like extract_text_from_image and extract_table_from_pdf by focusing on Word documents and mentioning page range and content filtering options.

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

Usage Guidelines3/5

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

The description implies usage for Word documents and mentions filtering options, but it does not explicitly state when to use this tool over alternatives such as extract_text_by_expression or convert_word_to_pdf_form. There is no mention of exclusions or alternative tools for PDFs or other formats.

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/pdf4me/pdf4me-mcp'

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