Skip to main content
Glama

extract_text

Runs OCR on images or PDF files, returning recognized text and optionally saving it as a .txt asset in a chosen folder.

Instructions

Runs OCR on an image or PDF and returns the extracted text.

Input Schema

NameRequiredDescriptionDefault
pathNoPath of a local file to send. Give this or content_base64, not both.
folderNoAlso store the text as a .txt asset in this folder.
filenameNoFilename to store, e.g. 'hero.jpg'. Defaults to the path's name.
folder_idNoUUID of an existing destination folder.
content_base64NoFile content, base64-encoded (20 MB max). Requires filename.
include_blocksNoAlso return line blocks with bounding boxes.
auto_create_foldersNoFalse to require the folder path to exist already.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

The description frames the tool as a pure read ("returns the extracted text") while the annotations declare readOnlyHint=false and the schema shows it can write a .txt asset into a folder — a side effect the description never mentions. No annotation contradiction exists, but for a tool with a non-read-only side effect the description should disclose that it can create files, and it does not.

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?

One front-loaded sentence that names the operation, the accepted input types, and the primary return value with zero filler. Nothing needs to be trimmed.

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?

With seven parameters, zero required fields, and an output schema (which removes the need to describe return values), the definition should still state that an agent must supply either `path` or `content_base64`. As written, an agent could plausibly call with no arguments, and the optional asset-storing side effect is never mentioned.

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 every one of the seven parameters is already documented in the schema, including the path-vs-content_base64 exclusivity and the 20 MB cap. The description adds no parameter meaning at all, so the baseline 3 applies.

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+resource ("Runs OCR on an image or PDF") and the return payload (`text`), which is enough to tell it apart from most siblings such as upload_file or remove_background. It never explicitly contrasts itself with the closest sibling, convert_document, which could also be read as extracting text.

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

Usage Guidelines2/5

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

The description gives no when-to-use, when-not-to-use, or alternative-tool guidance; the choice between extract_text and convert_document is left entirely to inference. The only selection constraint in the definition ("Give this or content_base64, not both") lives in the schema, not the description.

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