Skip to main content
Glama

read_document

Destructive

Read text content from PDF, TXT, MD, DOCX, or CSV files. Supports page ranges and auto-OCR for scanned PDFs.

Instructions

Read text content from a document with optional page selection. Use this when you need the raw text of a PDF, TXT, MD, CSV, or DOCX file; supports page ranges (e.g. "1-5", "1-3,7,10-12") and auto-OCR fallback for scanned PDFs. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYesThe document filename to read
pageNoOptional single page number to read (1-based). If omitted, returns full text.
pagesNoOptional page ranges to read, e.g. "1-5", "10", "1-3,7,10-12". Overrides 'page' if both provided.
Behavior1/5

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

The description claims 'Read-only' but annotations set readOnlyHint: false and destructiveHint: true, indicating possible side effects. This contradiction makes the behavioral description misleading and unreliable.

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 optional selection, then providing additional context. Every sentence adds value; no wasted words.

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?

Despite covering basics, the contradiction with annotations undermines completeness. No output format info, though simple text is implied. With no output schema, description should clarify return structure.

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%, and the description adds meaning beyond schema by explaining page range syntax (e.g., '1-5') and auto-OCR fallback, which are not in parameter 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 'Read text content from a document' and lists supported formats (PDF, TXT, MD, CSV, DOCX), differentiating it from siblings like extract_images or extract_tables.

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?

Description advises 'Use this when you need the raw text of a...file' and mentions page ranges and auto-OCR, providing clear context for usage, though it doesn't explicitly state when not to use it or name alternatives.

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

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