Skip to main content
Glama

extract_text

Extracts all visible text verbatim from UI screenshots, including error and warning messages, so text-only agents can read on-screen content.

Instructions

OCR: return all visible text verbatim, plus any error/warning messages shown (great for UI screenshots).

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": {
      "path": "<path>"
    },
    "name": "extract_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/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 burden. It usefully discloses that warnings/error messages shown on screen are captured alongside the text, which is non-obvious return behavior. It does not state accepted input formats, what happens on a non-image file, or whether output is a single string or structured payload.

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 tight sentence with the key term 'OCR' front-loaded, so an agent grasps the operation immediately. Nothing is padded, though the brevity contributes to the gaps elsewhere.

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 and no annotations, so the description must carry everything. It does cover what comes back (verbatim text plus on-screen warnings) and the intended scenario, but it omits input format, failure behavior, and any boundary against the two sibling vision tools.

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 coverage is 0% — the sole 'path' parameter has no description at all. The description never mentions the parameter, though 'OCR' and 'UI screenshots' imply it is an image file path. That is inference, not documentation; format expectations and supported extensions are absent.

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?

States a specific verb and resource: OCR extraction returning all visible text verbatim. That distinguishes it from describe_image (which interprets an image) and read_ui (which reads UI structure), though it never names those siblings explicitly. An agent can infer the difference but must do the inferring.

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 '(great for UI screenshots)' hints at the appropriate use case, which is real guidance. However, there is no explicit when-not guidance and no mention of the sibling tools describe_image or read_ui, so the agent has to guess at routing when it wants interpretation rather than transcription.

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

Deploy Server

Other Tools