Skip to main content
Glama

ocr_extract_pdf

Extract text from scanned legal PDFs—judicial files, notarial deeds, public resolutions—using native text extraction or OCR with adjustable language, engine, and page range.

Instructions

Extrae texto nativo o ejecuta OCR (Tesseract) sobre expedientes PDF judiciales, actas notariales o resoluciones públicas escaneadas.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dpiNoResolución de rasterizado para el OCR (por defecto 150; 300 para documentos borrosos)
langNoModelo de idioma del OCR. Por defecto 'spa' (español), que es lo que necesitan los expedientes chilenos. Si el modelo no está instalado, la respuesta trae una advertencia en 'advertencias' y el idioma realmente usado en 'ocr_language'.spa
engineNoMotor de OCR: 'auto' (detecta el mejor disponible), 'rapidocr' (PaddleOCR ONNX de alta precisión), 'paddleocr' o 'tesseract'
end_pageNoPágina final a procesar (opcional)
pdf_pathYesRuta absoluta o relativa al archivo PDF
force_ocrNoForzar OCR incluso si hay texto digital
start_pageNoPágina de inicio (1-indexed, por defecto 1)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.5.11
    • addedInput schema / properties / dpi
      Added value: +{
      +  "default": 150,
      +  "description": "Resolución de rasterizado para el OCR (por defecto 150; 300 para documentos borrosos)",
      +  "type": "integer"
      +}
    • addedInput schema / properties / lang
      Added value: +{
      +  "default": "spa",
      +  "description": "Modelo de idioma del OCR. Por defecto 'spa' (español), que es lo que necesitan los expedientes chilenos. Si el modelo no está instalado, la respuesta trae una advertencia en 'advertencias' y el idioma realmente usado en 'ocr_language'.",
      +  "enum": [
      +    "spa",
      +    "spa+eng",
      +    "eng",
      +    "osd"
      +  ],
      +  "type": "string"
      +}
  2. First observedv1.5.1

TDQS

A3.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It reveals the dual behavior (native text extraction vs. OCR) but does not disclose side-effect-free status, error conditions, or limitations. It also singles out 'Tesseract' despite the schema supporting multiple engines (rapidocr, paddleocr, auto), which is potentially misleading about the actual default behavior.

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?

A single, tightly written sentence that front-loads the core operation and immediately scopes the tool to its intended document types. No filler or repetition, so it earns maximum marks for conciseness.

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?

Given 7 parameters, no output schema, and no annotations, the description is somewhat thin. It does not describe the return format, potential warnings, or failure modes, and it does not mention how to choose between native extraction and OCR. The schema covers parameter semantics but not operational expectations, so the description is adequate but incomplete.

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%, so the baseline is 3. The description adds no parameter-specific meaning beyond what the schema already provides; all 7 parameters are well-documented in the schema, including defaults, enums, and fallback warning behavior.

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?

The description states a specific action ('Extrae texto nativo o ejecuta OCR') on a clear resource (PDF files) with a defined domain (judicial expedientes, actas notariales, resoluciones públicas escaneadas). It clearly distinguishes this tool from all sibling tools, which are predominantly search and analysis tools, by being the only OCR/extraction tool.

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?

The description provides clear context by specifying the target document types (scanned judicial files, notarial records, public resolutions), which implies when the tool is appropriate. However, it does not explicitly state when not to use it or name alternative tools for non-PDF or non-scanned documents, so it falls short of a 5.

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