Skip to main content
Glama

detect_text_regions

Detect text regions in images using OCR. Returns each region's text, bounding box, and confidence score for extracting brand titles, dosage tables, or ingredients lists.

Instructions

Detect text regions in an image using Tesseract OCR. Returns each region with its text content, pixel bounding box, and confidence score. Use this to find the coordinates of brand titles, dosage tables, ingredients lists, etc. Supports multiple languages (e.g. eng+rus) and various preprocessing modes for photos vs. clean scans. Set filter_garbage=false to keep OCR-noise regions, or crop_regions=true to also save per-region image crops that a vision model can re-recognize (useful when tesseract quality is low).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
psmNo
langNoeng
pathYes
detailNoword
preprocessNoclahe
crop_paddingNo
crop_regionsNo
filter_garbageNo
min_confidenceNo
crop_output_dirNo
Behavior4/5

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

Without annotations, the description carries the full burden. It discloses that the tool uses OCR, returns region data (text, bounding box, confidence), and supports various preprocessing modes. It does not explicitly state that it is read-only or has no side effects, but the description implies non-destructive behavior.

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 six well-structured sentences. It fronts the purpose, then provides usage examples and key parameter explanations. Every sentence adds value without redundancy.

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?

Given the complexity (10 parameters, no output schema), the description covers the main purpose and several critical parameters. However, it omits explanations for psm, detail, min_confidence, and crop_padding, and does not describe the return format beyond generalities. A more complete description would address these 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?

With 0% schema description coverage, the description must compensate. It explains lang (via example), preprocess (various modes), filter_garbage, crop_regions, and crop_output_dir (implied). However, psm, detail, min_confidence, and crop_padding are not explained, leaving about half of the parameters undocumented.

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 'Detect text regions in an image using Tesseract OCR', specifying the action (detect), resource (text regions in an image), and method (Tesseract OCR). It is distinct from sibling tools like detect_barcodes, which detects barcodes instead of general text.

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 provides specific use cases ('find the coordinates of brand titles, dosage tables, ingredients lists') and hints at when to use options like filter_garbage and crop_regions. However, it does not explicitly contrast with alternatives like detect_barcodes or explain when not to use this tool.

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/aschokinatgmail/annotation-mcp'

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