Skip to main content
Glama

Extract Text

document.extract_text
Read-onlyIdempotent

Extract plain text from a PDF or image (base64-encoded). Use when you need raw text for downstream AI analysis (summarization, claim checking, structured extraction). For documents at a public URL, use url.extract instead (no base64 encoding needed). Returns: { pages: number, text: string } Example prompts:

  • "Extract the text from this scanned contract so I can search it."

  • "Give me the raw text from this PDF document."

  • "OCR this image and return the text content."

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mime_typeYesMIME type of the document. Example: "application/pdf" for PDFs, "image/png" for PNG screenshots.
document_base64YesBase64-encoded PDF or image bytes (max ~15 MB). Example: "JVBERi0xLjcNJeLjz9MNCj..." (truncated PDF base64)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
pagesYes

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint as true, so description adds value with size limit (~15 MB) and return format ({pages, text}). No contradictions.

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?

Three short paragraphs: purpose, usage guidelines, return value and examples. Front-loaded with core action, every sentence adds value, no unnecessary words.

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?

Given 100% schema coverage, complete annotations, output schema, and sibling tools, the description sufficiently covers all aspects: input constraints, use cases, alternatives, and output format.

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% and parameters have descriptions. The description adds context with a realistic base64 example and supported mime types, going beyond the schema.

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 clearly states 'Extract plain text from a PDF or image (base64-encoded)', specifying verb, resource, and method. It distinguishes itself from sibling tool url.extract by noting the different input requirements.

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?

Explicitly says 'Use when you need raw text for downstream AI analysis' and identifies the alternative for public URLs ('use url.extract instead'). Provides example prompts for typical use cases.

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.

TDQS

A4.4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose, with no overlap. The category prefixes (account, bundle, collection, document, job, receipt, url) and specific action names (get, notarize, verify, create, list, etc.) ensure that an agent can unambiguously select the correct tool for any task.

Naming Consistency5/5

All tools follow a consistent category.action or category.action_noun pattern using snake_case (e.g., bundle.get, collection.add_document, url.translate). No mixed conventions or irregular names, making the pattern predictable and easy to learn.

Tool Count4/5

With 22 tools, the set is somewhat large but each tool addresses a distinct need within a broad domain (evidence management, document AI, collections, URL processing, job tracking, receipts). The count is slightly above the typical well-scoped range but still reasonable given the scope.

Completeness2/5

The tool surface has notable gaps: there is no tool to create or delete an evidence bundle, nor to update collections or bundles. The core workflow of creating a bundle from a document is missing, and the lifecycle is incomplete, which would likely cause agent failures in typical use cases.

Resources