Skip to main content
Glama

OCR (Extract Text)

ocr

Extract text verbatim from images or PDFs with Gemini multimodal OCR. Returns raw text as Markdown, preserving structure without summarization.

Instructions

Extract text verbatim from images or PDFs using Gemini multimodal OCR. Returns the raw text (as Markdown for structure) — no summarising or analysis. For documents/PDFs, MEDIUM resolution gives the same OCR quality at half the token cost.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imagesYesOne or more images/PDFs to OCR. Use filePath for large files (incl. .pdf).
languageNoOptional hint for the document language (e.g. "German"). Improves accuracy.
promptNoOptional override/extra instruction for the OCR (appended to the default).
modelNoModel to use (defaults to the configured image-analysis model).
max_tokensNoMaximum tokens in response (default 16384).
global_media_resolutionNoImage quality. MEDIUM (default) = same OCR quality as HIGH at 50% token cost.MEDIA_RESOLUTION_MEDIUM

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes
successYes
Behavior4/5

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

No annotations provided, so the description carries full burden. It transparently states the tool uses Gemini multimodal OCR, returns raw text as Markdown, and does no summarising or analysis. It also mentions token cost implications for resolution.

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 consists of two concise sentences. The first sentence clearly states the purpose and verb, and the second provides a valuable tip. No unnecessary 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?

Given the tool complexity (6 params, 1 required, output schema exists), the description covers the core purpose and a key performance tip. It doesn't explain all parameters, but the schema covers them adequately. Could mention handling multiple images, but not essential.

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 baseline is 3. The description adds marginal value beyond the schema, such as the tip about MEDIUM resolution and using filePath for large files. It does not compensate for any missing schema information.

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 the tool extracts text verbatim from images or PDFs using Gemini multimodal OCR. It specifies the output as raw text in Markdown and explicitly notes no summarising or analysis, distinguishing it from sibling tools like analyze_image or extract_structured_data.

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 implies usage for raw text extraction and provides a useful tip about MEDIUM resolution for documents/PDFs. However, it does not explicitly state when not to use this tool or mention alternatives among siblings.

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/Raindancer118/gemini-mcp'

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