Skip to main content
Glama

read_text

Extracts text from scans, photos, and scanned PDFs using OCR; optional page cleanup straightens images and removes shadows to improve recognition.

Instructions

OCR: read the text of a scan, photo or scanned PDF. language is a Tesseract code or a mix like 'eng+por' or 'rus+ukr+eng'. clean_up straightens the page and removes shadows first (recommended for phone photos). Needs the tesseract program and the language packs installed.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "read_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
pagesNo
clean_upNo
languageNoeng

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.8/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full load, and it delivers a real prerequisite: 'Needs the tesseract program and the language packs installed.' That is exactly the kind of environment requirement an agent can't get from the schema. It stops short of failure behavior or whether results are cached/written to disk.

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?

Three dense sentences, front-loaded with the purpose and then parameter-by-parameter notes. No filler, no restatement of the name or title.

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 values needn't be explained, and dependencies are covered. But the undefined 'pages' parameter and the absence of any routing against pdf_text leave gaps for a 4-parameter OCR tool in a crowded PDF/photography sibling set.

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 description coverage is 0%, and the description rescues two of the four parameters well: the language syntax ('eng+por', 'rus+ukr+eng') and clean_up's effect plus its default-worthy recommendation. 'pages' is left completely undefined in both schema and description, which is the one real hole.

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?

Opens with a specific verb+resource: 'OCR: read the text of a scan, photo or scanned PDF.' The word 'scanned' implicitly separates it from the text-layer sibling pdf_text, though the separation is never stated outright.

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?

Gives a concrete in-context recommendation ('clean_up ... recommended for phone photos'), which steers one parameter choice well. But it never says when to prefer this over pdf_text or clean_scan, and there is no explicit when-not guidance.

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