Skip to main content
Glama

invoice_preflight_50_pages

Paid invoice OCR ($0.475 USDC on Base): process complete PDF/image invoices up to 50 pages. Oversized PDFs are rejected before OCR.

Agent entry points: risky external action → use Agent Action Gate when a combined action-specific safety assessment is needed; unclear capability/provider → use free /api/discover; constrained comparison between callable alternatives → use paid route_tool; known single capability → call the direct tool; multi-step objective → read the matching workflow recipe and call only relevant steps. Workflows are stateless recipes, not executors; calls are paid separately and are not bundle charged. Agent Action Gate does not approve payment, sign or broadcast transactions, evaluate seller reputation, replace transaction simulation, replace route_tool, or replace human approval.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expectedNo
mime_typeNo
document_urlNo
document_base64No

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
metaNo
nextNo
errorNo
checksYes
resultNo
statusNo
invoiceYes
paymentNo
agent_uxNo
decisionYes
evidenceYes
warningsYes
source_sha256Yes
pages_processedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedOutput schema / properties / agent_ux
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "error": {
      +      "anyOf": [
      +        {},
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "meta": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "next": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "payment": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "execution_status": {
      +          "enum": [
      +            "not_started",
      +            "succeeded",
      +            "failed",
      +            "unknown"
      +          ],
      +          "type": "string"
      +        },
      +        "status": {
      +          "enum": [
      +            "not_required",
      +            "required",
      +            "settled",
      +            "failed",
      +            "unknown"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "status",
      +        "execution_status"
      +      ],
      +      "type": "object"
      +    },
      +    "result": {},
      +    "status": {
      +      "enum": [
      +        "succeeded",
      +        "failed",
      +        "partial",
      +        "outcome_unknown"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "result",
      +    "error",
      +    "meta",
      +    "payment",
      +    "next"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / error
      Added value: +{
      +  "anyOf": [
      +    {},
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / meta
      Added value: +{
      +  "additionalProperties": {},
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / next
      Added value: +{
      +  "items": {},
      +  "type": "array"
      +}
    • addedOutput schema / properties / payment
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "execution_status": {
      +      "enum": [
      +        "not_started",
      +        "succeeded",
      +        "failed",
      +        "unknown"
      +      ],
      +      "type": "string"
      +    },
      +    "status": {
      +      "enum": [
      +        "not_required",
      +        "required",
      +        "settled",
      +        "failed",
      +        "unknown"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "execution_status"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / result
      Added value: +{}
    • addedOutput schema / properties / status
      Added value: +{
      +  "enum": [
      +    "succeeded",
      +    "failed",
      +    "partial",
      +    "outcome_unknown"
      +  ],
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / expected / properties / line_items
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "amount": {
      +        "pattern": "^-?\\d+(?:\\.\\d{1,2})?$",
      +        "type": "string"
      +      },
      +      "description": {
      +        "maxLength": 300,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "description",
      +      "amount"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 1000,
      +  "minItems": 1,
      +  "type": "array"
      +}
  3. Changed2 schema fields changed
    • removedInput schema / properties / document_xml
      Removed value: -{
      -  "maxLength": 1000000,
      -  "minLength": 1,
      -  "type": "string"
      -}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "checks": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "actual": {
      +            "type": "string"
      +          },
      +          "calculated": {
      +            "type": "string"
      +          },
      +          "expected": {
      +            "type": "string"
      +          },
      +          "field": {
      +            "type": "string"
      +          },
      +          "status": {
      +            "enum": [
      +              "match",
      +              "discrepancy",
      +              "needs_review"
      +            ],
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "field",
      +          "status"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "decision": {
      +      "enum": [
      +        "match",
      +        "discrepancy",
      +        "needs_review"
      +      ],
      +      "type": "string"
      +    },
      +    "evidence": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "field": {
      +            "type": "string"
      +          },
      +          "source": {
      +            "type": "string"
      +          },
      +          "text": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "field",
      +          "source",
      +          "text"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "invoice": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "currency": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "line_items": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "amount": {
      +                "type": "string"
      +              },
      +              "description": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              }
      +            },
      +            "required": [
      +              "description",
      +              "amount"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "number": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "purchase_order": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "subtotal": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "supplier_name": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "tax": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "total": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "number",
      +        "supplier_name",
      +        "purchase_order",
      +        "currency",
      +        "subtotal",
      +        "tax",
      +        "total",
      +        "line_items"
      +      ],
      +      "type": "object"
      +    },
      +    "pages_processed": {
      +      "exclusiveMinimum": 0,
      +      "maximum": 9007199254740991,
      +      "type": "integer"
      +    },
      +    "source_sha256": {
      +      "type": "string"
      +    },
      +    "warnings": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "decision",
      +    "invoice",
      +    "checks",
      +    "evidence",
      +    "source_sha256",
      +    "warnings"
      +  ],
      +  "type": "object"
      +}
  4. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources