Skip to main content
Glama

Extraer texto de un PDF

read_pdf
Read-only

Extract plain text or JSON from direct PDF URLs for Ecuador open data analysis, with page range selection. No OCR, so scanned PDFs return empty.

Instructions

Extract text from a PDF at a direct URL (max 5 MB, 20 pages per call; pages selects a range). No OCR: scanned PDFs come back empty.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesDirect URL to the PDF file
pagesNoPage range, 1-indexed (e.g. "3", "1-5", "1,4,9").
formatNotext summary (default) or json structured result.text

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.13.0
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  2. Changed3 schema fields changedv0.10.0
    • addedInput schema / properties / format / description
      Added value: +"text summary (default) or json structured result."
    • addedInput schema / properties / pages / description
      Added value: +"Page range, 1-indexed (e.g. \"3\", \"1-5\", \"1,4,9\")."
    • addedInput schema / properties / url / description
      Added value: +"Direct URL to the PDF file"
  3. Changed5 schema fields changedv0.8.14
    • removedInput schema / properties / format / title
      Removed value: -"Format"
    • removedInput schema / properties / pages / title
      Removed value: -"Pages"
    • removedInput schema / properties / url / title
      Removed value: -"Url"
    • removedInput schema / title
      Removed value: -"read_pdfArguments"
    • removedOutput schema / title
      Removed value: -"read_pdfDictOutput"
  4. First observedv0.8.12

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true and destructiveHint=false, so safety is covered. The description adds real context beyond that: a 5 MB / 20-page ceiling and, critically, that there is no OCR so scanned PDFs return empty rather than erroring. This is exactly the kind of silent-failure disclosure an agent needs.

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?

Two short sentences, fully front-loaded: the action first, then constraints and the failure mode. Not a wasted word; the parenthetical carries real information.

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 still conveys the return shape indirectly (text summary vs json are in the format enum; "come back empty" implies the text result). Combined with 100% schema coverage, an agent has what it needs to call this correctly, though a hint about the json result structure would complete it.

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 100% and the schema already documents url, the 1-indexed pages range syntax, and the text/json enum. The description restates only that pages selects a range, adding no syntax or format detail beyond the schema. Baseline 3 is appropriate.

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 text from a PDF at a direct URL." No sibling tool does PDF text extraction (the rest are search/get/list tools over Ecuadorian datasets), so it is trivially distinguishable. The scope qualifiers (URL, 5 MB, 20 pages) sharpen rather than blur the purpose.

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?

The description implies usage conditions by requiring a "direct URL" and capping size/pages, which tells the agent when the call will succeed. However, it never states when to prefer this over alternatives (e.g. preview_resource_data, list_zip_contents for extracting content from other file types). Usage is inferable but not explicit.

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

Deploy Server

Other Tools