Skip to main content
Glama

pdf_text

Extract selectable text from a PDF, optionally for specific pages, to read or process document content. For scanned PDFs without selectable text, use an OCR or text-reading tool instead.

Instructions

Extract the selectable text of a PDF. pages like '1-3,5'; empty means all. Scans have none: use read_text.

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

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does disclose the critical trait: only selectable text is returned, and scanned PDFs yield nothing. It does not cover failure modes (missing/corrupt file) or whether output is paginated, which keeps it short of a 5.

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?

Three short clauses with zero filler: purpose first, then the parameter syntax, then the fallback alternative. Every sentence earns its place.

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

Completeness4/5

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

An output schema exists, so return-value detail is unnecessary, and the description covers purpose, page selection, and the scan caveat for a two-parameter read tool. Only minor gaps remain around preconditions and error behavior.

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 0%, so the description must compensate, and it does for the non-obvious parameter: the 'pages' syntax ('1-3,5') and the empty-string default meaning all pages. The 'path' parameter is left to the schema, which is acceptable since its meaning is self-evident.

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?

States a specific verb and resource ('Extract the selectable text of a PDF') with the key qualifier 'selectable', and explicitly names the sibling read_text as the fallback for scans. An agent can distinguish this from read_text without opening either schema.

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?

Gives a clear routing rule: if the PDF is a scan with no selectable text, use read_text instead. Usage context is explicit, but there is no guidance on other siblings (e.g., pdf_extract_pages) and no stated preconditions such as the file needing to exist locally.

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