Skip to main content
Glama

extract_document

Extract structured fields from invoices, receipts, and bank statements in PDFs or images, returning values, confidence scores, and review flags.

Instructions

Extract structured data from a PDF or image document (invoice, receipt, or bank statement) using the Parsed API. Returns fields with values, confidence scores, and review flags.

Input Schema

NameRequiredDescriptionDefault
doc_typeYesType of document to extract. Must be invoice, receipt, or bank_statement.
file_pathNoAbsolute or relative path to a local PDF or image file (PDF, PNG, JPG, JPEG, WEBP, TIFF, BMP).
file_base64NoBase64-encoded content of a PDF or image file. Use this if the file is already in memory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full disclosure burden. It usefully names the underlying Parsed API and describes the return payload (values, confidence scores, review flags), which matters since there is no output schema, but it omits failure behavior, supported-size limits, latency/synchronicity, and what 'review flags' imply for downstream handling.

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?

Two sentences with zero filler; the core action and scope come first and the return-shape detail follows. Every clause earns its place.

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?

With no output schema, the description compensates by summarizing the return payload, and the three parameters are fully covered by the schema. The remaining gap is operational context (limits, error modes, permissions) for a tool that depends on an external API.

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 every parameter is already documented in the input schema, including the doc_type enum and the two mutually exclusive file inputs. The description adds nothing beyond that, which is acceptable but not additive.

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?

States a specific verb ('extract'), a specific resource ('structured data from a PDF or image document'), and enumerates the supported document classes. It is unambiguous and easily distinguished from the only sibling, check_usage.

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?

Usage is implied by the resource type (a document you have on disk or in memory), but there is no explicit when-to-use guidance, no prerequisites such as API credentials, and no statement of when this tool should not be used.

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

Deploy Server

Other Tools