Skip to main content
Glama

ocr_auto

Extract text from images and PDFs, automatically splitting large PDFs or compressing images to stay within size limits.

Instructions

Smart OCR that automatically handles oversized files. For PDFs: splits into chunks, OCRs each, and joins results. For images: compresses to fit within size limit before OCR. Use this when you don't know if the file exceeds the size limit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tierNoAPI tier: 'free' (1MB limit, US servers) or 'pro' (5MB limit, EU/GDPR)free
languageNoOCR language code (e.g., 'eng', 'ger', 'fre'). Use 'auto' with Engine 2.eng
file_pathYesPath to the image or PDF file to OCR
ocr_engineNoEngine 1: Faster, Asian languages. Engine 2: Auto-detect, better accuracy.
output_pathNoOptional path to save extracted text (.txt) or full result (.json)
output_formatNoOutput format: 'txt' (text only) or 'json' (full API response)txt
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses key behaviors: automatic chunking for PDFs, compression for images, and result joining. This gives the agent critical insight into how the tool handles large files, beyond what the schema exposes.

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?

The description is three sentences, front-loaded with the core value proposition ('Smart OCR'), then details specific behaviors, and ends with usage guidance. Every sentence earns its place, no wasted words.

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?

The description provides sufficient behavioral context for a tool with 6 parameters and no output schema. It explains the automatic handling of oversized files, which is the tool's unique advantage, and the schema covers the rest. No major gaps.

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?

The input schema has 100% description coverage for all 6 parameters, so the description doesn't need to add parameter-level detail. It adds context about file handling (splitting/compression) that informs the file_path parameter, but the schema already documents the rest adequately. 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?

The description clearly states it's an OCR tool that automatically handles oversized files, with specific behavior for PDFs (split/OCR/join) and images (compress). This distinguishes it from siblings like ocr_url and ocr_file, which likely handle direct OCR without auto-handling of size limits.

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?

Explicitly states 'Use this when you don't know if the file exceeds the size limit,' providing clear when-to-use guidance. It doesn't explicitly name alternatives but implies that for known under-limit files or URL-based OCR, other tools (ocr_file, ocr_url) would be more appropriate.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/agentic-ai-forge/ocr-space-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server