Skip to main content
Glama
README.md923 B
# @doc-agent/extract Extract structured data from invoices, receipts, and bank statements using Vision AI. ## Use cases - Parse PDF or image documents into structured JSON - Extract vendor, amount, date, line items from financial documents - Local privacy-first extraction without cloud APIs (Ollama) ## Exports - `extractDocument(path, config)` — Main extraction function - `getMimeType(path)` — Detect MIME type from file extension ## Providers | Provider | Requires | Best for | |----------|----------|----------| | `gemini` | `GEMINI_API_KEY` env var | Accuracy, speed | | `ollama` | Local Ollama + `llama3.2-vision` | Privacy, offline | ## Depends on - `@doc-agent/core` — DocumentData, Config types ## Used by - `@doc-agent/cli` — extract command, MCP server ## Gotchas - Ollama retries once on Zod validation failure (LLM output can be inconsistent) - PDF support requires vision-capable model

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/prosdevlab/doc-agent'

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