Skip to main content
Glama

ocr_by_content

Extract text from Base64-encoded images. Choose from plain, JSON, Markdown, or structured output with optional enhancement, rotation, and binarization.

Instructions

对 Base64 编码的图像执行 OCR 识别。

Args:
    image_base64: Base64 编码的图像(支持 data:image/... 前缀)
    output_format: 输出格式 (plain/json/markdown/structured)
    auto_enhance: 自动增强图像对比度和锐度
    rotate: 自动旋转图像(基于 EXIF)
    binarize: 二值化图像

Returns:
    OCR 识别结果

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rotateNo
binarizeNo
auto_enhanceNo
image_base64Yes
output_formatNojson
Behavior3/5

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

With no annotations provided, the description carries the full burden of disclosing behavior. It does explain the effects of parameters like auto_enhance ('automatically enhance contrast and sharpness'), rotate ('based on EXIF'), and binarize, which adds some behavioral context. However, it does not disclose limitations (e.g., image size, supported formats), error handling, or whether the image is stored or transmitted beyond the operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and begins with a clear one-sentence summary. The parameter list is structured and each item is explained concisely. It does repeat parameter names already present in the schema, but adds necessary semantic value, so the length is justified. The Returns section is brief but present.

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?

The tool has 5 parameters, no annotations, and no output schema. The description covers all parameters and states the return type as 'OCR 识别结果', but this is vague. It does not specify the exact structure of the result (especially for output_format=json or structured), nor does it mention input constraints or error scenarios. Given the absence of an output schema, more detail about the return value would be valuable, so completeness is only moderate.

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

Parameters5/5

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

The input schema has no parameter descriptions (coverage 0%), so the description must compensate. It does so thoroughly: image_base64 is described as Base64 encoded with support for data:image/ prefix, output_format lists the valid values (plain/json/markdown/structured), and auto_enhance, rotate, and binarize each have plain-language meanings. This fully explains the parameters beyond what the schema provides.

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: '对 Base64 编码的图像执行 OCR 识别' (perform OCR on Base64-encoded images). It specifies both the action (OCR) and the resource (Base64 image), and the name 'by_content' distinguishes it from sibling tools like ocr_by_path and ocr_by_url.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool versus the alternatives. The description does not mention ocr_by_path, ocr_by_url, or ocr_batch, nor does it explicitly state that this tool is for Base64 input as opposed to file paths or URLs. The name implies the distinction, but the description itself offers no usage direction.

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/bitfarer/rapidocr-mcp'

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