Skip to main content
Glama

extract_text

Extract text from screen, window, region, or image file with on-device OCR. Returns recognized text and confidence scores for use in automation.

Instructions

Read the words off the screen, or off a saved image, and return them as text. Recognition runs on the Mac itself and nothing is uploaded. Prefer this over take_screenshot whenever the answer is words rather than a picture — an error dialog, a log, a terminal, a table, text baked into an image or a paused video, a PDF page in a viewer that will not let text be selected. It costs a fraction of the tokens an image does and does not depend on reading pixels correctly. Use take_screenshot instead when layout, colour or 'what does this look like' is the question. mode 'screen' captures everything with no user interaction; 'region' and 'window' hand the user the native crosshair or window picker and wait for them, up to five minutes. Pass 'path' instead of a mode to read an image already on disk, including one take_screenshot just wrote. Returns 'text' (every line in reading order, top to bottom) and 'lines' — each with the recognized string, Vision's 0..1 'confidence', and 'box' {x,y,w,h} as fractions 0..1 of the image with origin at TOP-LEFT. Those boxes share the coordinate space annotate_screenshot draws in, so a line can be circled where it was found by passing the same path to that tool. The text is also copied to the clipboard unless 'clipboard' is false. An area with no readable text returns ok with an empty 'text' and a 'note' rather than an error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoWhat to capture; ignored when 'path' is givenregion
pathNoRead this image file instead of capturing (.png, .jpg)
clipboardNoCopy the recognized text to the clipboard (default true)
languagesNoBCP-47 tags to recognize, most likely first, e.g. ['uk-UA','en-US']. Omit to use the user's configured choice. Which are available depends on the macOS version; get_state lists the current setting under 'text_languages'
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so thoroughly. It discloses local-only processing ('nothing is uploaded'), interactive mode behavior with a five-minute wait, clipboard copying, the returned text and lines structure with confidence and boxes, coordinate-space compatibility with annotate_screenshot, and the ok-with-empty-text behavior for areas with no readable 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?

The description is dense but well-organized, front-loading the core purpose and usage guidance before diving into mode specifics and return values. Every sentence adds useful information, and nothing is redundant with the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having no output schema and no annotations, the description sufficiently explains return values ('text' and 'lines' with confidence and boxes), coordinate conventions, clipboard side effects, interaction timing, and empty-result behavior. For a tool of this complexity, this is complete enough for an agent to invoke it correctly and interpret results.

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 coverage is 100%, so the baseline is 3, but the description adds meaningful behavioral context beyond the schema: mode screen needs no user interaction, region/window open a native picker and wait up to five minutes, path can be supplied by take_screenshot, and clipboard defaults to true. It does not add material language-parameter semantics, but the schema already covers those fully.

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 opens with a specific verb and resource: 'Read the words off the screen, or off a saved image, and return them as text.' It explicitly distinguishes this tool from take_screenshot, making its unique role clear even alongside 22 sibling tools.

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?

The description gives explicit when-to-use guidance: 'Prefer this over take_screenshot whenever the answer is words rather than a picture' and lists concrete cases like error dialogs, logs, terminals, and PDFs. It also names the exact alternative for visual questions: 'Use take_screenshot instead when layout, colour or what does this look like is the question.'

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ostapondo/Plonk'

If you have feedback or need assistance with the MCP directory API, please join our Discord server