Skip to main content
Glama

Extract text from an image

vision_ocr

Extracts exact text from images (OCR) for verbatim copying from screenshots, code images, terminal output, documents, and receipts. Supports plain, markdown, or JSON output.

Instructions

Extract exact text from an image (OCR). Use when the user wants literal text copied verbatim from a screenshot, code image, terminal output, document, or receipt. Not for explaining or understanding images (use vision_analyze).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoOptional model override.
detailNoOptional detail level for providers that support it.
imageUrlNoRemote URL, data URL, or file URL. Mutually exclusive with imagePath and imageBase64.
imagePathNoLocal absolute image path. Mutually exclusive with imageUrl and imageBase64.
maxTokensNoOptional max output tokens.
imageBase64NoBase64-encoded image payload. Use this for uploaded attachments when the client can pass file contents.
languageHintNoOptional language hint such as zh-CN or en.
outputFormatNoPreferred OCR output format. Defaults to plain.
imageMediaTypeNoRequired with imageBase64, for example image/png or image/jpeg.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText returned by the vision model.
modelYesModel used for the request.
mediaTypeYesResolved image media type.
sourceLabelYesResolved image source label.
Behavior4/5

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

No annotations exist, so the description carries the full behavioral burden. It discloses the core behavior of extracting exact, verbatim text and implies a non-destructive operation. However, it does not mention potential limitations (e.g., language/accuracy) or explicitly state that it is read-only, though this is strongly implied.

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 concise and front-loaded with the purpose. It consists of two sentences: the first defines the tool, the second provides usage and an alternative. Every sentence contributes meaning without redundancy.

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

Completeness4/5

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

With 9 parameters, all covered by schema descriptions, and an output schema present, the description adds the essential context: when to use and when not, plus clear differentiation from a sibling. It does not explain return values because the output schema covers that. Slight gap is lack of mention of mutual exclusivity of image inputs, but that is covered in the schema.

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?

Schema description coverage is 100%, so the baseline is 3. The description adds useful context about image types but does not provide parameter-specific semantics beyond what the schema already contains. No additional value for the 9 parameters.

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 the tool's function: 'Extract exact text from an image (OCR).' It uses a specific verb and resource, provides concrete examples, and explicitly differentiates from vision_analyze by stating it is 'Not for explaining or understanding images (use vision_analyze).'

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?

Provides explicit when-to-use guidance: 'Use when the user wants literal text copied verbatim from a screenshot, code image, terminal output, document, or receipt.' It also gives a clear exclusion and alternative: 'Not for explaining or understanding images (use vision_analyze).'

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/xiaoshengyvlin/MCP-Vision'

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