Skip to main content
Glama

extract_text

Extracts text from the Mac screen or a saved image, returning the words as text. Runs locally, useful for pulling text from error dialogs, logs, PDFs, or videos.

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 richly. It discloses that recognition runs locally, nothing is uploaded, mode 'region'/'window' waits up to five minutes for user interaction, returns both 'text' and 'lines' with confidence and bounding boxes, boxes use top-left origin, text is copied to clipboard unless disabled, and empty results return ok with a note instead of an error.

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 substantial but every sentence provides unique value. It is front-loaded with the core purpose, then usage guidance, then behavioral details. There is no redundancy or filler; the length is justified by the tool's complexity.

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?

The description covers all relevant context: modes, timing, return format, coordinate system, clipboard side-effect, empty-result behavior, and language configuration reference via get_state. Even without an output schema, the return values are fully documented, making the tool self-sufficient.

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 description coverage is 100%, so the baseline is 3. The description adds meaningful context beyond the schema by clarifying mode behavior (screen captures everything, region/window invoke native pickers), the path parameter reading an existing file, and clipboard copying defaulting to true. This extra context elevates the score above baseline.

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 clearly distinguishes itself from the sibling take_screenshot by stating that this tool is for words while screenshots are for layout/color/appearance.

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?

Explicit guidance is provided: 'Prefer this over take_screenshot whenever the answer is words rather than a picture' and 'Use take_screenshot instead when layout, colour or what does this look like is the question.' It also explains when to use each mode (screen vs region/window) and how path fits in.

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