Skip to main content
Glama
pdf4me
by pdf4me

AI-Process Receipt

process_receipt

Extract structured data from receipts: line items, merchant info, totals, and custom fields. Provide a receipt image or PDF and get machine-readable JSON output.

Instructions

AI-Process Receipt (processReceipt): extract structured receipt data via PDF4me POST /api/v2/ProcessReceipt. Body: docName, docContent, analyzeItems, extractMerchantInfo, calculateTotals (all booleans, defaults true), isAsync (true); optional receiptType (omit when empty or 'none'); customFieldKeys camelCase when keys present (list and/or CSV merged); optional profiles (sanitized like other process tools). Provide pdf_file_path (local .pdf/.png/.jpg/.jpeg). docName resolution: uses basename unless doc_name is set. receipt_type examples: meal, supplies, hotel, fuel and energy, transportation, communication, subscriptions, entertainment, training, healthcare, generic. 202 + Location poll; saves process_receipt.json.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_nameNo
profilesNo
output_dirNo
receipt_typeNo
analyze_itemsNo
pdf_file_pathNo
calculate_totalsNo
custom_field_keysNo
custom_field_keys_csvNo
extract_merchant_infoNo
Behavior4/5

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

With no annotations, the description carries the full burden and discloses key behaviors: async execution ('202 + Location poll'), output persistence ('saves process_receipt.json'), parameter defaults, docName resolution, and customFieldKeys merging rules. It omits auth/rate limit details but provides substantial behavioral context beyond the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is information-dense but presented as a long run-on paragraph with many parenthetical clauses, making it harder to scan. It repeats the tool name and packs several distinct concerns into one sentence, reducing structural clarity despite every part having substance.

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 complex tool with 10 parameters and no output schema or annotations, the description is largely complete: it covers purpose, key parameters, execution flow (202 + Location polling), and the output artifact. Missing details like output_dir semantics and exact return payload are gaps, but the overall context is robust.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description compensates by mapping API field names, explaining customFieldKeys camelCase and CSV merging, providing receipt_type examples, and stating boolean defaults. It leaves output_dir unexplained, but the majority of the 10 parameters receive meaningful semantic context.

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 and resource: 'extract structured receipt data via PDF4me POST /api/v2/ProcessReceipt.' This differentiates it from sibling document-processing tools by targeting receipts and structured extraction. The redundant title phrase is a minor issue but does not obscure purpose.

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 the receipt use-case through 'extract structured receipt data' and the list of receipt_type examples, but it never explicitly states when to choose this tool over related siblings like process_invoice or process_universal_document. There is no mention of exclusions or alternative tools, leaving usage guidance implicit.

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/pdf4me/pdf4me-mcp'

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