Skip to main content
Glama

pdf_text

Read-only

Extract text from selected PDF pages or search for snippets, and flag scanned pages that need OCR.

Instructions

Text of a PDF per page (pages "1-3,7"), or search with snippets; scanned pages flagged (need OCR).

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": {
      "path": "<path>"
    },
    "name": "pdf_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
pagesNo
searchNo
max_charsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

A3.6/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true, so the description carries the rest of the behavioral burden. It usefully discloses that search returns snippets and that scanned pages are flagged as needing OCR, which an agent cannot infer from the structured data. It stops short of describing output shape or how max_chars affects truncation.

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?

One dense sentence with no filler, and the core capability is front-loaded before the page-syntax example and OCR caveat. It is arguably too compressed, trading some clarity for brevity, which keeps it from a 5.

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?

With four parameters, no output schema, and only a readOnlyHint annotation, the description covers the main modes and the OCR caveat but omits what max_chars does and what the returned structure looks like. An agent can call it, but must guess at truncation behavior.

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 must compensate for four parameters. It gives the crucial pages syntax ("1-3,7") and explains search, but leaves max_chars and the path argument entirely unexplained, so compensation is only partial.

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 names a specific verb+resource ("Text of a PDF per page") and adds the two operating modes (page extraction vs. search with snippets). It does not name a sibling or explicitly differentiate from tools like extract or media_info, but the purpose is unambiguous.

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?

Usage is implied by the two modes described (get page text, or search with snippets), and the OCR caveat hints at when results are incomplete. There is no explicit when-to-use vs. an alternative tool, and no stated guidance on choosing search over page extraction.

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