Skip to main content
Glama

ocr_extract_pdf

Read-only

Extract native text or run OCR on scanned Chilean judicial PDFs, notarial records, and public resolutions. Turns image-only legal documents into searchable text.

Instructions

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

Input 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.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered. The description adds only the fact that it either reads native text or runs OCR, and it names Tesseract exclusively even though the engine parameter also supports rapidocr/paddleocr/auto, a mildly narrowing omission rather than a contradiction. It says nothing about warnings, fallback language behavior or failure modes.

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 front-loaded sentence with the verb and output first and the qualifying document domain after; no filler, no redundancy. Appropriately sized for one line of description.

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?

For a 7-parameter tool with no output schema, the description covers the domain and the dual extraction path but omits output shape, page-range vs whole-document behavior, and any note on multi-engine selection. The unusually rich schema descriptions compensate substantially, keeping this at minimum-viable rather than inadequate.

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; parameters like dpi, lang, engine, force_ocr and page ranges are fully documented in the schema, including the 'advertencias'/'ocr_language' fallback behavior. The description adds nothing about parameter semantics beyond naming Tesseract as an OCR backend.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific dual action (extraer texto nativo / ejecutar OCR) on a named resource (PDF) and narrows the domain to judicial expedientes, actas notariales and scanned public resolutions. It does not compare itself to the sibling ocr_plan_documento, so the agent gets a clear purpose but no explicit sibling differentiation.

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?

Usage is only implied through the document types listed; the agent can infer this is for scanned judicial PDFs, but there is no explicit when-to-use, no when-not-to-use, and no mention of the sibling alternative ocr_plan_documento. Nothing misleading, but nothing that actively routes the agent either.

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