Skip to main content
Glama

extract_text_from_image

Extract OCR text from screenshots, documents, tables, terminal output, or code images. Convert visual content into machine-readable text for analysis.

Instructions

Extract OCR text from screenshots, documents, tables, terminal output, or code images.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_idNofile_id returned by PUT /upload. Preferred over image_base64 to avoid corruption of large base64 in the tool-call path. Persistent across restarts, content-deduplicated.
mime_typeNoMIME type. Required with image_base64; ignored (uses stored value) with file_id.image/png
image_base64NoRaw base64-encoded image bytes, without a data: URL prefix. Prefer file_id for large images.
language_hintNo
output_formatNojson
preserve_layoutNo
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the action and omits important context like output format, layout preservation behavior, input method preferences, or limitations. This is insufficient for a tool with no annotation support.

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 a single front-loaded sentence with no fluff. It efficiently communicates the core purpose and supported input types.

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

Completeness2/5

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

With no output schema and no annotations, the description should explain expected outputs and behavioral nuances. It does not, leaving significant gaps for a tool with six parameters and two distinct input methods.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 50%, and the description adds no parameter guidance. It doesn't explain language_hint, output_format, preserve_layout, or the decision between file_id and image_base64, which are key to correct usage.

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 a specific action ('Extract OCR text') and lists concrete input types (screenshots, documents, tables, terminal output, code images). It distinguishes itself from siblings like extract_table_from_image, which targets tabular data specifically, and analyze_image, which implies broader analysis.

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?

The description implies use cases by enumerating various image types, but it does not explicitly state when to use this tool over alternatives. No mention of exclusions or sibling tools, such as directing table extraction to extract_table_from_image.

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/xyun1996/ocular'

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