Skip to main content
Glama

Extract Text

extract_text

Extract readable text from images, screenshots, documents, signs, and handwriting using Gemini vision OCR for accurate digitization.

Instructions

Extract text from an image using OCR.

Uses Gemini's vision capabilities for high-quality text extraction. Works with screenshots, documents, signs, handwriting, etc.

Input Schema

NameRequiredDescriptionDefault
modelNoAnalysis model override. Default gemini-3.5-flash-lite. Use gemini-3.8-flash for harder OCR.
image_pathYesPath to the image to extract text from
use_groundingNoEnable Google Search grounding for more accurate, factual results.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.0
    • addedInput schema / properties / model
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Analysis model override. Default gemini-3.5-flash-lite.\nUse gemini-3.8-flash for harder OCR."
      +}
  2. First observedv0.5.4

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the burden alone. It discloses the underlying engine and that it is an OCR extraction, but says nothing about cost, latency, rate limits, or permissions — meaningful gaps for a model-backed vision call, though the read-only nature is implicit in 'extract'.

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?

Two short sentences, front-loaded with the core action, with no filler. The second sentence's input-type list is somewhat loose but still informative.

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?

An output schema exists, so return values need not be explained. However, with zero annotations the description should have covered behavioral aspects like cost or whether grounding affects billing/accuracy tradeoffs; it only gestures at this via the schema.

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 (image_path, model override, use_grounding) are already documented in the schema, including the model recommendation. The description adds no parameter-level meaning beyond that, so 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?

Names a specific verb and resource ('Extract text from an image using OCR'), and the second sentence clarifies the engine (Gemini vision) and scope of input types. It does not explicitly differentiate itself from the closest sibling, analyze_image, which an agent could plausibly confuse it with.

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

Usage Guidelines3/5

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

The examples ('screenshots, documents, signs, handwriting') imply when the tool is appropriate, but there is no explicit when-to-use versus when-to-use-analyze_image guidance and no exclusions or prerequisites.

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