Skip to main content
Glama
PDF.co MCP Server

PDF.co MCP Server

Official
by pdfdotco

AI invoice parser

ai_invoice_parser

Extracts key invoice data from PDFs using AI, converting invoice details into structured fields for processing and automation.

Instructions

AI Invoice Parser: Extracts data from invoices using AI. Ref: https://developer.pdf.co/api/ai-invoice-parser.md

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": {
      "url": "<url>"
    },
    "name": "ai_invoice_parser"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesURL to the source PDF file. Supports publicly accessible links including Google Drive, Dropbox, PDF.co Built-In Files Storage. Use 'upload_file' tool to upload local files.
api_keyNoPDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)

Output Schema

NameRequiredDescriptionDefault
tipsNo
statusYes
contentYes
credits_usedNo
credits_remainingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.0.12
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / api_key / title
      Removed value: -"Api Key"
    • removedInput schema / properties / url / title
      Removed value: -"Url"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "content": {},
      +    "credits_remaining": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "credits_used": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "status": {
      +      "type": "string"
      +    },
      +    "tips": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "content"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

C2.7/5.0
Behavior2/5

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

Annotations declare readOnlyHint=false and destructiveHint=false, so the agent knows only that this is a non-destructive, non-read mutation/flagship call. The description adds no behavioral context such as whether the call is asynchronous, whether it consumes API credits, what happens with unsupported or non-invoice PDFs, or authentication requirements beyond the schema default. A single link to external documentation does not convey behavior in the tool definition itself.

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

Conciseness4/5

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

Extremely short and front-loaded, with no padding. The documentation reference is compact rather than verbose, though it displaces content that would have earned its place in the definition body.

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?

An output schema exists, so return-value explanation is legitimately omitted, and both parameters are fully documented by the schema. However, for a specialized AI extraction tool with real behavioral unknowns (sync vs async, cost, failure modes on non-invoice input), the description stops short of what an agent needs to invoke it confidently.

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%: the url parameter already documents supported sources (Google Drive, Dropbox, built-in storage) and points to upload_file for local files, and api_key documents the env-var fallback. The description adds nothing beyond that, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Extracts data from invoices using AI" gives a verb and a resource, but it largely restates the name and title rather than specifying what data is returned (line items, totals, vendor fields). It also never distinguishes this from general-purpose siblings like pdf_to_json or pdf_info_reader, which an agent could easily confuse with a specialized invoice extractor.

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?

There is no when-to-use, when-not-to-use, or alternative guidance. An agent learning nothing about when an invoice parser is preferable to pdf_to_json has to infer it entirely from the name.

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