Skip to main content
Glama

extract_text_from_screenshot

Extract visible text from screenshots with OCR. Transcribe code, terminal output, and documentation verbatim without repairing or altering the source content.

Instructions

Transcribe visible text from screenshots without repairing or beautifying the source.

Use this tool ONLY when the user has a screenshot containing text and wants to extract it. This tool specializes in OCR for code, terminal output, documentation, and general text extraction.

Do NOT use for: UI design conversion, error diagnosis, or diagram understanding.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesInstructions for verbatim transcription. Specify the text to extract, output format, and any explicitly requested character normalization.
image_sourceYesLocal file path or remote URL to the image
programming_languageNoOptional: specify the programming language if the screenshot contains code (e.g., 'python', 'javascript', 'java'). Leave empty for auto-detection or non-code text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.0

TDQS

A4.2/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, and it does disclose one valuable trait: transcription is verbatim with no repair or beautification, which prevents an agent from expecting cleaned-up output. However, it says nothing about return format (plain text transcript?), handling of large/multi-page images, language coverage, or failure modes on unreadable text.

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?

Three short blocks: purpose first, then the positive trigger, then the exclusion list. Front-loaded and free of filler; the only near-redundancy is 'general text extraction' restating the opening sentence, which is minor.

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?

For a three-parameter OCR tool with no output schema, the definition covers purpose, trigger, exclusions, and the verbatim-output stance well. It stops short of describing what the caller receives back or any limits on image size/format, which matters since there is no output schema to fall back on.

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 all three parameters (prompt, image_source, programming_language) are already documented in the schema, including the optional language hint. The description adds no syntax, format, or constraint detail beyond what the schema provides, so the baseline of 3 applies.

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?

States a specific verb ('Transcribe') and resource ('visible text from screenshots') plus a distinguishing constraint ('without repairing or beautifying the source'). The exclusions named in the description map directly onto siblings (ui_to_artifact, diagnose_error_screenshot, understand_technical_diagram), so an agent can separate this tool from its alternatives without reading any schema.

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

Usage Guidelines5/5

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

Explicitly states the positive trigger ('ONLY when the user has a screenshot containing text and wants to extract it') and enumerates when not to use it ('UI design conversion, error diagnosis, or diagram understanding'). The alternatives are essentially named by their function, leaving nothing to inference.

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