Skip to main content
Glama
sawftware-apps

DocImprint Document Intelligence

Official

Extract Text

document.extract_text
Read-onlyIdempotent

Extract raw text from base64-encoded PDFs or images for AI analysis such as summarization, claim checking, or structured extraction. Returns page count and text content.

Instructions

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
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, covering the safety profile. The description adds value by specifying the return shape ('Returns: { pages: number, text: string }') and indicating OCR capability for images. It does not contradict 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?

The description is well-structured, starting with the core action, followed by usage context, an alternative, the return format, and example prompts. The example prompts are slightly redundant but aid understanding. It is not overly verbose.

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 simple tool with 2 parameters and full schema coverage, the description covers purpose, usage, output shape, and an alternative tool. It does not mention error handling or size limits, but the schema includes the size limit, making the overall guidance adequate.

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?

The input schema provides 100% coverage with descriptions and examples for both parameters. The description does not add significant parameter details beyond what the schema already states, so the baseline score of 3 is appropriate.

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 a specific verb+resource: 'Extract plain text from a PDF or image (base64-encoded).' It also distinguishes itself from the sibling tool url.extract by explicitly noting that URL-based documents should use that alternative, which avoids ambiguity.

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?

The description provides explicit when-to-use guidance: 'Use when you need raw text for downstream AI analysis (summarization, claim checking, structured extraction).' It also names a concrete alternative for public URLs, fulfilling the when-not-to-use condition.

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/sawftware-apps/docimprint-sdk'

If you have feedback or need assistance with the MCP directory API, please join our Discord server