Skip to main content
Glama

ocr_plan_documento

Determines how to extract text from a Chilean legal PDF: uses native text when available, or recommends OCR engine, DPI, and double-pass settings for scanned files.

Instructions

Recomienda —con razonamiento del sistema jurídico chileno— cómo extraer el texto de un PDF: nativo si ya trae capa de texto; si está escaneado, OCR con motor y DPI según el tipo (expediente_judicial, escritura_notarial, sentencia_antigua, documento_administrativo, tabla_o_liquidacion) y doble pasada cuando hay plazos o cifras en juego (art. 66 CPC). Devuelve el plan, su fundamento y las alternativas: la decisión es del harness.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contextoNoPara qué se usará (consulta o caso en curso)
pdf_pathYesRuta del PDF a medir
tipo_documentoNoOpcional: expediente_judicial, escritura_notarial, sentencia_antigua, documento_administrativo o tabla_o_liquidacion

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.11.0

TDQS

A4.1/5.0
Behavior4/5

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

No annotations provided, so the description carries the burden and does well: it discloses that it returns a plan, its rationale, and alternatives, and that the ultimate decision belongs to the harness. It doesn't state whether it reads the PDF itself or just inspects metadata, which would help an agent know cost/latency implications.

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?

A single dense sentence followed by a short one; front-loaded with the core recommendation and the branches flow logically. It is verbose but every clause carries information (native vs OCR, DPI tiers, double pass, legal basis).

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?

Given no output schema, the description explains what is returned (plan, rationale, alternatives) and what the agent is expected to do with it. For a 3-param planning tool with no annotations, this covers purpose, branching logic, and output shape well, though it omits any cost, side-effect or failure-mode notes.

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 coverage is 100%, so the schema already documents all three parameters. The description echoes the document types (tipo_documento) but does not add format, range, or syntax detail beyond what the schema provides. 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 (recommends how to extract text) plus resource (PDF), and names its sibling relationship by describing a planning role distinct from ocr_extract_pdf (which presumably does the extraction). It specifies the legal domain (Chilean legal system) and enumerates the document categories.

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 clearly signals when each branch applies (native layer vs scanned, DPI by document type, double pass when deadlines or figures are involved) and explicitly states the harness makes the decision. It does not explicitly say 'do not use this for X' or name a specific alternative tool by name.

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