Skip to main content
Glama

图片文字识别

ocr_image

Extract text from a single public image URL (PNG/JPG/WebP, up to 8MB) and return the full text or structured blocks with confidence scores and coordinates.

Instructions

识别单张图片(png/jpg/webp,≤ 8MB)中的文字,返回 fullText 与分块(含置信度/坐标)。计费工具(占 1 次当日 OCR 额度,失败不扣)。imageUrl 必须是公网可访问 URL;本地文件路径无法使用。mode=full 只出全文,structured 出带坐标分块。

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": {
      "imageUrl": "<imageUrl>"
    },
    "name": "ocr_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNo默认 auto
imageUrlYes图片公网 URL,≤ 8MB

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, it discloses that this is a billed tool consuming one daily OCR quota, that failures are not charged, and that the input must be a network-reachable URL rather than a local path. Those cost and access semantics are exactly the kind of context annotations cannot convey. The quota consumption is also consistent with readOnlyHint=false.

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?

Four compact sentences, front-loaded with purpose and return shape, then the billing note, then the input constraint, then mode behavior. Every clause carries information an agent needs before calling; nothing is redundant with the schema.

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 no output schema, the description does the work of describing return values (fullText plus blocks with confidence/coordinates), and it covers formats, size limits, cost, and mode. Gaps remain around supported languages and how auto mode resolves, but nothing critical to invoking it correctly is missing.

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 already 100%, so the baseline is 3; the description earns more by explaining what mode=full versus mode=structured actually returns, which is output semantics the enum alone does not convey. The enum's third value, auto, is left unexplained, which keeps it short of a 5.

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 names a specific verb and resource (recognize text in a single image), lists accepted formats and the size cap, and states exactly what comes back (fullText plus blocks with confidence and coordinates). None of the sibling tools (dubbing, ASR, TTS, voice listing) overlap with OCR, so no sibling disambiguation is required.

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?

It gives clear preconditions for use — the URL must be public and local file paths will not work — and explains which mode to pick for full text versus coordinate blocks. There is no explicit 'do not use this when...' clause and no named alternative, but with no overlapping sibling available there is little left to route between.

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