Skip to main content
Glama

Invoice PDF to data

invoice
Read-onlyIdempotent

Extract structured billing data from public PDF links, including vendor, dates, totals, line items, and Excel links; text-based files only, with optional password support.

Instructions

Read invoice PDFs at public URLs into structured data. Each item is one invoice: invoice number, invoice and due dates, vendor, currency, subtotal, tax, total, line items (description, quantity, unit price, amount) and an Excel link. Text-based PDFs only, not scans. Cost: $5.00 per 1,000 invoices ($0.005 each) on the user's Apify account. Latency: usually 10-30 s.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pdf_urls": "<pdf_urls>"
    },
    "name": "invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
pdf_urlsYesDirect public links to PDF files (https://...). The file must download without a login.
max_invoicesNoStop after this many invoices.
pdf_passwordNoOptional. Password for protected PDFs. Leave empty otherwise.
extract_line_itemsNoAlso read item rows. Off = header fields and totals only.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive behavior, so the safety profile is covered. The description earns credit for adding cost ($5.00 per 1,000 invoices, billed to the user's Apify account) and latency (typically 10-30 s) — operational traits an agent needs before invoking a paid, slow job. It does not discuss failure modes (e.g., what happens if the PDF fails to download or the password is wrong), which keeps it from going higher.

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?

Front-loaded with the capability, then the output shape, then constraints, then cost and latency — each sentence carries distinct decision-relevant information. There is no filler or repetition of the tool name.

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

Completeness5/5

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

With an output schema present, the description need not explain return values, yet it still sketches the item structure usefully. Cost, latency, input restrictions, and the batch cap are all covered, which is everything an agent needs for a paid, asynchronous-style extraction job.

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 coverage is 100%, with per-parameter descriptions covering the URL requirement, max invoices, password and the line-items toggle, so the schema carries the burden. The description reinforces the 'public URL, no login' constraint and the line-item extraction scope but adds no syntax or format details beyond the schema. Baseline 3 applies.

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 and resource ('Read invoice PDFs at public URLs into structured data') and enumerates exactly which fields come back (invoice number, dates, vendor, currency, subtotal, tax, total, line items, Excel link). The limitation 'text-based PDFs only, not scans' further narrows the resource so an agent knows precisely what this tool accepts.

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

Usage Guidelines4/5

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

Gives a clear positive condition (public, login-free PDF URLs) and an explicit exclusion ('not scans'), which is enough to steer an agent away from image-based extraction. It stops short of naming a sibling tool for scanned documents, so routing in that case is left to inference.

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