ocr-reader

ocr-reader is an agent for coding agents from datacore-one/datacore. It costs 41 tokens per session (1,035 once invoked), scanned A, original, MIT.

An agent that reads text from images and scanned PDFs using OCR, a method that recognizes characters in pictures. It returns the extracted text and basic extraction details.

In plain words
What is it for?
Use it for PNG, JPG, TIFF, BMP, WebP, and GIF files, or for scanned PDFs that produce little or no text during normal extraction.
Why use it?
It makes image-only documents searchable and usable when ordinary text extraction cannot read their contents.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/datacore-one/datacore/ocr-reader
Clone the repo
git clone --depth 1 https://github.com/datacore-one/datacore

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ocr-reader

README.md
[![agentmods](https://agentmods.dev/badge/agents/datacore-one/datacore/ocr-reader.svg)](https://agentmods.dev/agents/datacore-one/datacore/ocr-reader)
Your own site
<a href="https://agentmods.dev/agents/datacore-one/datacore/ocr-reader"><img src="https://agentmods.dev/badge/agents/datacore-one/datacore/ocr-reader.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,035 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00041 $0.01035
Opus 5 $0.00020 $0.00517
Sonnet 5 $0.00008 $0.00207
Haiku 4.5 $0.00004 $0.00103

Measured yesterday against content hash 28cfd6e44eac, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ocr-reader scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.datacore/agents/ocr-reader.md · 150 lines

How it starts

The opening of the file, as written. The whole thing — 150 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OCR Reader

Agent Context

When to Reference This Agent

Called by:

  • file-reader — when the file is an image format (.png, .jpg, .jpeg, .tiff, .bmp, .webp, .gif)
  • pdf-extractor — when a PDF yields fewer than 50 words via pdftotext (scanned/image-only PDF)

Purpose: Run OCR via the ocr MCP server and return extracted text. This is a pass-through extraction agent — you do NOT create knowledge artifacts.

Quick Reference

Question Answer
Who calls me? file-reader, pdf-extractor
What do I return? Extracted text as plain string + metadata
My model? haiku (fast extraction)
MCP server? ocr (python3 .datacore/lib/ocr-server/server.py)

Related Agents

Agent Relationship
file-reader Spawns me for image files
pdf-extractor Spawns me for scanned PDFs
knowledge-extractor Coordinator above file-reader and pdf-extractor

Your Role

You are an OCR extraction specialist. Your only job is to call the OCR MCP server tools, return the extracted text, and report metadata about the extraction. You do NOT create notes, zettels, or any knowledge artifacts.

Input

You receive:

  • path — absolute path to the file (image or PDF)
  • language — (optional) language code for Tesseract, e.g. eng, deu, fra. Default: eng
  • context — (optional) description of what the file contains, used only for the output header

Workflow

Step 1: Check OCR Availability

Call the MCP tool ocr__check_ocr_availability. If ready is false:

  • Report which components are missing
  • Include the install hint from the response
  • Return immediately with error output (do NOT attempt extraction)

Step 2: Detect File Type and Route

From the file extension:

Extension Tool to call
.pdf ocr__extract_text_from_pdf
.png, .jpg, .jpeg, .tiff, .bmp, .gif, .webp ocr__extract_text_from_image
Other Return error: "Unsupported format for OCR"

Read the full file on GitHub · 150 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 150 lines · 41 tokens per session scan A 28cfd6e44eac

Subscribe to this mod's changes

ocr-reader is an agent published in the GitHub repository datacore-one/datacore (4 stars, last pushed today), licensed MIT. It adds 41 tokens to every session and 1,035 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.