Skip to main content
Glama

Extract Text

extract_text
Read-onlyIdempotent

Extract text from an image or PDF via OCR, pass an image/PDF URL, get the recognized text. Useful for reading screenshots, scanned documents, receipts, signs. Engine 2 is best for most cases.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "image_url": "https://dl.a9t9.com/ocr/solarcell.jpg"
    },
    "name": "extract_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
engineNoOCR engine to use: 1, 2, or 3 (default 2). Engine 2 is best for most cases.
_apiKeyNoOptional, your own OCR.space API key for higher limits; omit to use the shared Pipeworx key.
filetypeNoForce the file type instead of letting OCR.space infer it: 'PDF', 'GIF', 'PNG', 'JPG', 'TIF', 'BMP' or 'WEBP'. Inferred from the URL's extension when omitted. Supply it when the URL has no extension (a signed link, a redirect, an API endpoint), without it OCR.space refuses with E216 rather than guessing.
is_tableNoSet true to improve layout detection for tables/receipts (default false).
languageNoLanguage code for OCR (default 'eng'). Examples: 'eng', 'fre', 'ger', 'spa'.
image_urlYesURL of an image or PDF to run OCR on.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / _apiKey / description
      Previous value: -"Optional — your own OCR.space API key for higher limits; omit to use the shared Pipeworx key."New value: +"Optional, your own OCR.space API key for higher limits; omit to use the shared Pipeworx key."
    • changedInput schema / properties / filetype / description
      Previous value: -"Force the file type instead of letting OCR.space infer it: 'PDF', 'GIF', 'PNG', 'JPG', 'TIF', 'BMP' or 'WEBP'. Inferred from the URL's extension when omitted. Supply it when the URL has no extension (a signed link, a redirect, an API endpoint) — without it OCR.space refuses with E216 rather than guessing."New value: +"Force the file type instead of letting OCR.space infer it: 'PDF', 'GIF', 'PNG', 'JPG', 'TIF', 'BMP' or 'WEBP'. Inferred from the URL's extension when omitted. Supply it when the URL has no extension (a signed link, a redirect, an API endpoint), without it OCR.space refuses with E216 rather than guessing."
  2. Changed1 schema field changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "image_url": "https://example.com/receipt.jpg"
      -  },
      -  {
      -    "engine": 2,
      -    "image_url": "https://example.com/document.pdf",
      -    "is_table": true,
      -    "language": "fre"
      -  }
      -]New value: +[
      +  {
      +    "image_url": "https://dl.a9t9.com/ocr/solarcell.jpg"
      +  },
      +  {
      +    "engine": 2,
      +    "image_url": "https://dl.a9t9.com/ocr/solarcell.jpg",
      +    "is_table": true,
      +    "language": "eng"
      +  }
      +]
  3. Changed1 schema field changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "image_url": "https://example.com/receipt.jpg"
      -  },
      -  {
      -    "_apiKey": "your-ocrspace-api-key",
      -    "engine": 2,
      -    "image_url": "https://example.com/document.pdf",
      -    "is_table": true,
      -    "language": "fre"
      -  }
      -]New value: +[
      +  {
      +    "image_url": "https://example.com/receipt.jpg"
      +  },
      +  {
      +    "engine": 2,
      +    "image_url": "https://example.com/document.pdf",
      +    "is_table": true,
      +    "language": "fre"
      +  }
      +]
  4. Changed1 schema field changed
    • addedInput schema / properties / filetype
      Added value: +{
      +  "description": "Force the file type instead of letting OCR.space infer it: 'PDF', 'GIF', 'PNG', 'JPG', 'TIF', 'BMP' or 'WEBP'. Inferred from the URL's extension when omitted. Supply it when the URL has no extension (a signed link, a redirect, an API endpoint) — without it OCR.space refuses with E216 rather than guessing.",
      +  "type": "string"
      +}
  5. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "image_url": "https://example.com/receipt.jpg"
      +  },
      +  {
      +    "_apiKey": "your-ocrspace-api-key",
      +    "engine": 2,
      +    "image_url": "https://example.com/document.pdf",
      +    "is_table": true,
      +    "language": "fre"
      +  }
      +]
  6. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so safety is covered; the description adds only the recommendation to use engine 2. Notably absent are the operationally important facts that live in the schema rather than the description: that OCR.space is the upstream service, that the shared key imposes limits and a personal _apiKey raises them, and that filetype must be forced for extensionless URLs (E216). Since the annotations lower the bar, a 3 is fair, but the description itself carries little behavior beyond the annotations.

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?

Three compact sentences, front-loaded with purpose and then usage, with no filler. Slight redundancy: "pass an image/PDF URL, get the recognized text" largely restates the opening clause, so one sentence could have been trimmed.

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 six-parameter read-only OCR tool with no output schema and full schema coverage, the description supplies purpose, input contract, and use cases, and annotations cover the safety profile. It could still mention that output is plain recognized text (not structured) and that PDFs are accepted at the URL, but nothing critical for correct invocation is missing.

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 parameter is already documented, and the description adds only the engine-2 default recommendation, which the schema also states. Baseline 3 is appropriate — the schema does the heavy lifting and the description does not extend it meaningfully.

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?

Names a specific verb and resource ("Extract text from an image or PDF via OCR") and immediately states the input/output contract: give a URL, get recognized text. It also enumerates concrete use cases (screenshots, scanned documents, receipts, signs), so the agent needs no schema lookup to know what this does.

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

Usage Guidelines4/5

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

Provides clear applicability context via the use-case list and steers the engine choice ("Engine 2 is best for most cases"), which is genuine when-to-use guidance. It stops short of exclusions or alternatives — nothing tells the agent what this tool is unsuitable for or which sibling to prefer instead.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.