Skip to main content
Glama
nooot77
by nooot77

extract_document

Extract structured JSON data from invoices, receipts, and business documents via public URL. Get vendor, customer, line items, totals, VAT, and currency fields.

Instructions

Extract structured data from an invoice, receipt, commercial register, VAT certificate, or other business document at a public URL. Returns JSON with all detected fields including vendor, customer, line items, totals, VAT, and currency. Each extraction consumes one unit from the authenticated user's plan quota.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
languageNoLanguage hint (ar=Arabic, en=English, fr=French, es=Spanish). Omit for automatic detection.
document_urlYesPublic URL of the document to extract (JPEG, PNG, WebP, or PDF). Must be publicly accessible — no authentication required to fetch.
document_typeNoDocument subtype hint. Use 'inventory' for itemised invoices with line items, 'general' for service invoices, 'pos' for POS receipts, 'auto' to let the API decide (default).
Behavior4/5

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

With no annotations provided, the description adds valuable behavioral context: 'Each extraction consumes one unit from the authenticated user's plan quota' and 'Returns JSON with all detected fields...'. This goes beyond the schema by revealing a side effect (quota usage) and the output structure. It does not contradict any annotations (none given), though it could also disclose whether the operation is asynchronous or how errors are surfaced.

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?

The description is succinctly written in three sentences: purpose, output, and quota cost. It front-loads the primary action, contains no redundant text, and each sentence contributes substantive information. This is an example of concise, well-structured writing.

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?

For a tool with no output schema and no annotations, the description covers core functionality, return format, and quota implications. However, it fails to explain the relationship with sibling tools – specifically whether the extraction is synchronous or if the result must be retrieved later via get_extraction or list_extractions. This omission is significant for an agent deciding on the correct sequence of tool calls.

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 fully describes all three parameters (100% coverage), so the baseline for this dimension is 3. The description reinforces that document_url must be public and lists output fields, but does not add any additional semantic meaning for the language or document_type parameters beyond what the schema already provides.

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?

The description specifies 'Extract structured data from an invoice, receipt, commercial register, VAT certificate, or other business document at a public URL' – a clear verb+resource. It implies a distinct action from the retrieval-oriented siblings (get_extraction, list_extractions) by describing the creation of an extraction and its quota consumption, but does not explicitly differentiate by name.

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 description implies usage for extracting data from public documents, but provides no explicit guidance on when to use this tool versus the sibling tools. It mentions the requirement of a public URL and quota consumption, yet lacks clear 'use this for X, use get_extraction for Y' instructions, leaving the agent to infer the division of responsibilities.

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/nooot77/scantobill-mcp-server'

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