Skip to main content
Glama

extract_invoice_data

Extract structured data from an invoice PDF: vendor, invoice number, date, line items, taxes (GST-aware), totals — as JSON. Requires Team tier or above.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_urlNoHTTPS URL of the file to process (the server downloads it)
filenameYesFilename with extension, e.g. invoice.pdf
file_base64NoBase64-encoded file content (alternative to file_url; max 15MB decoded)

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries full burden. It discloses that file_url involves server download, and file_base64 has a 15MB limit. However, it does not mention error handling, file type validation, or whether the operation is read-only. The output format is mentioned but not detailed.

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 a single sentence that immediately states the purpose and output, followed by a necessary prerequisite. It avoids redundancy and is efficiently front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (extracting structured data from invoices) and the absence of an output schema, the description should elaborate on the return structure, field types, or example outputs. It only says 'as JSON' without any schema details, leaving ambiguity for the agent about what to expect.

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 has 100% description coverage, so the baseline is 3. The description does not add significant new meaning about parameters; it focuses on what the tool extracts rather than how the parameters are used. The parameter descriptions in the schema are already clear.

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 the verb 'Extract' and the resource 'structured data from an invoice PDF', listing specific fields (vendor, invoice number, date, line items, GST-aware taxes, totals) and output format (JSON). It distinguishes from sibling tools like 'compress_pdf' and 'parse_bank_statement' by its specific focus on invoice extraction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description notes a prerequisite ('Requires Team tier or above') but provides no guidance on when to use this tool instead of similar alternatives like 'parse_bank_statement' or 'validate_gstin'. There is no mention of exclusions or typical scenarios, leaving the agent without clear decision support.

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/5.0
Disambiguation5/5

Each tool targets a distinct document processing task (compression, fraud detection, invoice extraction, statement parsing, conversion, reconciliation, GST validation) with clear descriptions that avoid overlap.

Naming Consistency5/5

All tool names follow the verb_noun snake_case pattern (e.g., compress_pdf, validate_gstin), providing a predictable and uniform naming convention.

Tool Count5/5

Seven tools cover the core capabilities for a PDF/document magic service focused on financial documents, balancing breadth without being overwhelming or sparse.

Completeness4/5

The set addresses key workflows (compress, convert, extract, parse, validate, reconcile), but misses general OCR or merge/split features. For the financial niche, it is nearly complete.

Resources