Skip to main content
Glama

batch_ocr

Extract text from every PDF in a directory using OCR, save each result as a .txt file, and return a summary of processed files for batch document digitization.

Instructions

Processa todos os PDFs de um diretório via OCR.

Salva cada resultado como .txt (no mesmo diretório ou em output_directory).
Retorna um resumo com a lista de arquivos processados.

Args:
    directory: Caminho do diretório contendo os PDFs.
    output_directory: Diretório de saída (opcional). Se não informado, salva ao lado dos PDFs.
    dpi: Resolução para OCR (150, 200, 300 ou 400). Default: 300.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dpiNo
directoryYes
output_directoryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the write side-effect (each PDF saved as .txt) and the return summary, but says nothing about overwrite behavior, permissions, recursion into subdirectories, or what happens to non-PDF/failed files in the directory.

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?

Front-loaded with the core action and side-effect in two short sentences, followed by a clean Args block. Well organized, no filler.

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?

An output schema exists so return-value detail is not required, and the params are fully covered. However, for an unannotated batch mutation tool, the description omits failure/overwrite/permission semantics that an agent would need to invoke it safely.

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 0%, so the description must compensate, and it documents all three parameters: directory purpose, optional output_directory with its default behavior (saved beside the PDFs), and dpi with allowed values (150/200/300/400) and default 300 — detail the schema's bare integer type lacks.

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 verb+resource+scope: OCR every PDF in a directory, writing .txt results. The batch scope ('todos os PDFs de um diretório') implicitly separates it from the single-file siblings (ocr_pdf, ocr_image), though no sibling is named.

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 implied by the batch-directory scope, but there is no explicit when-to-use/when-not guidance and no mention of the sibling tools (ocr_pdf, ocr_page, check_legibility) to route the agent. The agent must infer that this is for multi-file batches.

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