Skip to main content
Glama

cua_ocr

Run offline Chinese and English OCR on screens, app windows, or image files to extract exact text and click coordinates for GUI automation, including OpenGL/Metal/DirectX apps.

Instructions

Run offline Chinese+English OCR (Apple Vision on macOS / WinRT Windows.Media.Ocr on Windows) on the screen, an app window, or an image file. Returns exact text, click coordinates (cx, cy), normalized [0..1000] boxes, and element ref IDs. Essential for OpenGL/Metal/DirectX apps like Blender, Photoshop, and DaVinci Resolve.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "cua_ocr"
  }
}

Input Schema

NameRequiredDescriptionDefault
fastNo
queryNoOptional substring filter on recognized text.
targetNofull
displayNo
app_nameNo
image_pathNoOptional existing PNG/JPG path to OCR instead of capturing screen.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It discloses that OCR is offline, names the platform engines, lists supported capture sources, and explains the return values. It omits permission requirements, failure behavior when no text is found, and explicit read-only or side-effect information.

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 compact and front-loaded, starting with the core action and then covering outputs and relevant app categories. Every sentence adds useful information without repetition or filler.

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?

There is no output schema, so the description usefully explains returned text, click coordinates, normalized boxes, and element ref IDs. It is still incomplete for a six-parameter capture tool because most parameters and permission requirements are not covered. The core behavior is understandable, but an agent would need to infer several invocation details.

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 only 33%, and the description does not explain most parameters. It implies the target and image-path modes by mentioning screen, app window, and image file, but leaves fast, display, and app_name unexplained. It adds some meaning beyond the schema but does not compensate for the coverage gap.

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 states a specific verb and resource: run offline Chinese+English OCR on the screen, an app window, or an image file. It also describes the outputs and distinguishes the tool as OCR-oriented rather than a general screenshot or element-tree tool. It does not explicitly contrast with siblings such as cua_screenshot or cua_ui_tree, which keeps it from a 5.

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 gives useful context that OCR is essential for OpenGL/Metal/DirectX apps like Blender, Photoshop, and DaVinci Resolve. However, it does not explicitly say when to use this instead of cua_screenshot, cua_ui_tree, or cua_find_elements. The usage guidance is implied rather than specified.

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