Skip to main content
Glama

Read the text of a PDF

pdf_find
Read-onlyIdempotent

Read the text of a PDF: every span with its page, position, font and span id, optionally filtered by query (the same four match modes an edit uses) and pages, over the content, forms and annotations layers. Paginated: pass the returned next_cursor back as cursor for the next page. Use it before pdf_edit to check what a document actually says and to pick the scope that selects the match you mean.

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": {
      "file": "<file>"
    },
    "name": "pdf_find"
  }
}

Input Schema

NameRequiredDescriptionDefault
ocrNoAlso read pages by recognition: 'auto' for pages with no text layer, 'on' for every page named. Limited to 3 pages per request; the rows carry `is_ocr` and `confidence`, and their ids (`p1o3`) are not editable by `span_ids` -- edit them with `find` plus `scope.region` and `options.ocr`. (default: "off")
fileYesThe PDF: an absolute (or ~) local path, which this server uploads for you, an https:// URL the API fetches, or an `f_…` file id from an earlier call.
limitNo(default: 200)
matchNo
pagesNo
queryNo
cursorNo
imagesNoAlso list the images each page draws (`images[]`: page, name, bbox, pixels) -- what `op: remove_image` takes a box from. (default: false)
layersNo
passwordNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / ocr
      Added value: +{
      +  "description": "Also read pages by recognition: 'auto' for pages with no text layer, 'on' for every page named. Limited to 3 pages per request; the rows carry `is_ocr` and `confidence`, and their ids (`p1o3`) are not editable by `span_ids` -- edit them with `find` plus `scope.region` and `options.ocr`. (default: \"off\")",
      +  "enum": [
      +    "off",
      +    "auto",
      +    "on"
      +  ],
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / images
      Added value: +{
      +  "description": "Also list the images each page draws (`images[]`: page, name, bbox, pixels) -- what `op: remove_image` takes a box from. (default: false)",
      +  "type": "boolean"
      +}
  3. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, openWorld), so the description's added value is behavioral detail: pagination via `next_cursor` returned to `cursor`, which layer set is scanned, and the editable-vs-non-editable span distinction implied by the pre-edit guidance. It still omits notable behavior an agent would care about, such as the per-request OCR page cap, the limit ceiling, and password-protected file handling, all of which sit only in the schema.

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?

Three sentences, front-loaded with the output shape, then filtering, then pagination, then when-to-use — a sensible ordering with no filler. It is dense with backticked identifiers but every clause carries information rather than restating the name or title.

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?

With no output schema and 10 parameters including a nested `match` object, the description does the necessary work of describing the returned span fields and the cursor round-trip, which the schema cannot express. The remaining gaps (OCR caps, image listing, auth via password) are documented in the schema, so the omission is not disqualifying for a read tool.

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 40% across 10 parameters, so the description must compensate and it only partly does. It adds real meaning for `query` (tied to the same four `match` modes an edit uses), `pages`, `layers` and `cursor`, but never mentions `file`, `password`, `limit`, `images` or `ocr` semantics, leaving nearly half the surface to the schema alone.

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 ("Read the text of a PDF") and immediately specifies the unit and shape of the result: every span with page, position, font and span id. It also distinguishes itself from the sibling mutator by framing itself as the pre-check for pdf_edit, so an agent can pick between the two 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 an explicit usage rule: use it before pdf_edit to see what a document says and to pick the `scope` that selects the intended match. It supplies the positive when and a concrete downstream dependency, but no when-not or alternative for cases like previewing a rendered page (pdf_preview is never addressed).

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.