Skip to main content
Glama

Read a document

get_document_text
Read-only

Text of a document (PDF, Word, Excel, PowerPoint …) page by page ("[Page n]"), so you can answer questions about it or summarize it. Long documents: read on from next_start_page, or pass a page range.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "document_id": "<document_id>"
    },
    "name": "get_document_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
end_pageNo
start_pageNo
document_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

The annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. Beyond that, the description adds real behavioral detail: output is chunked page by page with '[Page n]' markers, long documents can be continued or bounded with a page range, and a range of document formats is handled. It omits failure behavior (e.g., missing document_id) and any size limits.

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?

Two compact sentences, front-loaded with what is returned and followed by practical continuation advice; nothing is padded. Minor readability cost from stacked parentheses and nested quotation marks around '[Page n]'.

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

Completeness3/5

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

For a 3-parameter read tool with no output schema, the description does useful work by describing result shape (per-page text with markers) and continuation semantics. It is still incomplete on how to obtain a valid document_id, on error behavior, and it leaves the meaning of 'next_start_page' ambiguous, which matters because it looks like a callable parameter.

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

Parameters3/5

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

Schema description coverage is 0%, so the description carries the burden of explaining all three parameters. It does convey that start_page/end_page form a page range and that document_id identifies the document, but it never states what document_id actually is (an integer ID obtainable from list_documents) or any constraints, and it introduces 'next_start_page' which is not a parameter at all.

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 states a specific resource (text of a document) and scope (page by page, with '[Page n]' markers), plus supported formats, which lets an agent tell it apart from get_document_stats or list_documents. It stops short of naming a sibling explicitly, so it is clear but not maximally differentiated.

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?

It gives a use context ('so you can answer questions about it or summarize it') and pagination guidance for long documents, which is genuine when-to-use help. However, it never says when to prefer this over siblings such as get_document_stats or fetch, and the pagination advice points at 'next_start_page', a name that is not in the input schema, which could mislead an agent into trying to pass it.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources