Skip to main content
Glama

ocr

Extract text from image files or URLs using OCR, accurately transcribing printed, stylized, low-contrast, and multi-column content to provide verbatim text output.

Instructions

Process an image file or URL using OCR to extract text.

Uses EasyOCR for robust scene-text extraction. Excels at photos, signage, watermarks, logos, and printed text.

This is the right tool for any text in an image. EasyOCR handles both of the cases that used to need separate routing -- dense printed text and stylized, cursive, logo or low-contrast text -- so there is no longer a reason to send the second kind to query_image, which paraphrases rather than transcribing.

A page laid out in side-by-side columns (a form, meeting notes, a resume) is detected automatically: each column is OCR'd separately and joined in reading order, so fields from different columns don't get interleaved.

An image with no text returns an empty result, and that is the correct answer rather than a failure -- do not re-ask a captioning or VQA model to produce text for it, which is how invented text gets into a payload.

Set detail=true to get confidence scores and bounding boxes. This is highly recommended for checking generative image artifacts: if an image contains gibberish text, the confidence scores will drop significantly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
srcYesLocal file path or http(s) URL of the image to process. PDFs are also accepted and are rendered one image per page, so tools that return a list return one entry per page.
detailNoWhen true, return verbatim text *and* the bounding box and confidence score for each text span (via EasyOCR). Each page becomes a dict with `text_regions` ({text, confidence, box}[], box=[x1,y1,x2,y2] in page coordinates) and the joined `text`. Use this when you need to know *where* a phrase is, or to evaluate OCR confidence scores for anomaly detection.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.2

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description fully carries the behavioral burden. It discloses that it uses EasyOCR, handles column layouts automatically, returns an empty result for no-text images rather than failing, and that detail=true exposes confidence scores and bounding boxes useful for detecting gibberish text. This is rich, non-obvious behavioral context.

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?

The description is long but well-organized and front-loaded with the core purpose. Each paragraph adds a distinct point: capabilities, routing, column handling, empty-result semantics, and detail guidance. It could be slightly tightened, but nothing is extraneous.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an OCR tool with a rich schema and output schema, the description covers selection, alternatives, edge cases, and advanced usage. It explains what happens with no text, how columns are handled, and when to use detail. No critical information needed to invoke the tool correctly is missing.

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?

The schema already describes both parameters at 100% coverage, so the baseline is 3. The description adds value beyond the schema by recommending detail=true for generative-artifact checking and explaining that low confidence indicates invented or gibberish text, which the schema does not convey.

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 first sentence states a specific verb and resource: 'Process an image file or URL using OCR to extract text.' It further distinguishes itself from the sibling tool query_image by explaining that query_image paraphrases rather than transcribes, making the tool's unique role explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says this is the right tool for 'any text in an image' and explains why query_image is not appropriate. It also gives when-to-use guidance for detail=true and warns against re-asking a captioning model when no text is found, covering both use and non-use cases.

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