Skip to main content
Glama

ocr_image

Extract text from images such as screenshots, receipts, or book pages. Accepts a local file path or URL and returns recognized text for reuse.

Instructions

OCR:识别图片中的文字(适合截图、票据、书页等)。

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

Input Schema

NameRequiredDescriptionDefault
promptNo可选:自定义识别要求
sourceYes本地图片路径或 URL

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden of behavioral disclosure, and it says nothing about what comes back (raw text? structured blocks?), language handling, image size/format limits, or whether 'local path' requires the file to be accessible to the server. For a tool whose entire value is its output text, this is a meaningful gap.

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?

A single compact sentence with the function stated first and the qualifying examples folded into a parenthetical. Nothing is wasted, though the brevity comes partly from omitting useful information.

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?

With only two simple parameters and no output schema, the definition covers the input side adequately, but a reader cannot tell what the response looks like or whether the result is a plain transcription or annotated regions. Some additional return-value context is warranted since no output schema exists to compensate.

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 both `source` (local path or URL) and `prompt` (custom recognition requirements) are already documented in the schema. The description adds no further parameter meaning, which is acceptable at full schema coverage but earns only the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 — OCR / recognize text in images — and adds concrete input examples (screenshots, receipts, book pages) that make the scope tangible. It stops short of differentiating itself from the analyze_image sibling, but the function is unambiguous.

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 parenthetical examples imply when the tool is appropriate (text-dense images), but there is no explicit when-not guidance and no mention of which sibling to use for non-OCR image analysis. Usage is suggested rather than prescribed.

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