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.

Input Schema

NameRequiredDescriptionDefault
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 / 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"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description adds pagination mechanics ('pass the returned `next_cursor` back as `cursor`') plus the fact that filtering spans three layers. It stops short of describing error behavior, password-protected failure modes, or rate limits, which are relevant for an openWorld tool.

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 dense sentences with the core purpose front-loaded and no filler. The phrase 'the same four `match` modes an edit uses' is compact but assumes the agent already knows pdf_edit's match schema, slightly reducing clarity for a marginal size gain.

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, the description carries the return-shape burden and does so by naming span fields and `next_cursor`. For a 9-parameter, nested-object read tool it is close to complete, but it omits what `limit` constrains and how protected PDFs behave.

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 only 33%, so the description has to compensate, and it does for the hard ones: it explains `query` is filtered by the same four `match` modes an edit uses, and it names the `layers` values and cursor round-trip. It leaves `limit`, `password`, and the `match.normalize`/`across_lines` sub-options unexplained beyond their schema defaults.

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?

Opens with a specific verb+resource ('Read the text of a PDF') and immediately characterizes the return unit ('every span with its page, position, font and span id'), so an agent knows exactly what it gets back. It also names pdf_edit and the layering, which separates it from the mutating sibling.

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?

Explicitly prescribes usage relative to an alternative: 'Use it before `pdf_edit` to check what a document actually says and to pick the `scope` that selects the match you mean.' That is real routing guidance, though it gives no when-not-to-use cases and says nothing about pdf_preview or pdf_batch as alternatives.

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.