Skip to main content
Glama

Agent Decision & Evidence Tools (MCP + x402)

EU Invoice Payment Guard

invoice_to_pay_dossier_eu
Read-only

One signed decision before an EU invoice is paid: READY_FOR_BUYER_APPROVAL, HOLD_FOR_REVIEW or DO_NOT_PAY with evidence and safe next actions. Accepts UBL/CII XML or ZUGFeRD/Factur-X with one embedded invoice XML, not ordinary/scanned PDFs. Complete EN 16931 validation, live VIES, EU/UN/UK sanctions, VAT treatment and a buyer-trusted IBAN match. READY_FOR_BUYER_APPROVAL does not prove delivery, internal approval, duplicate-ledger status or bank-account ownership. Free input check first; 1.00 USDC per completed dossier, no subscription or paid follow-up.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
b2bNo
filenameNoinvoice.xml
invoice_xmlNo
supply_typeNoservice
buyer_countryYes
document_base64No
expected_amountYes
expected_currencyYes
expected_buyer_vatNo
trusted_payee_ibanYes
expected_supplier_vatNo
expected_supplier_nameNo
purchase_order_referenceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolNo
errorNo
checksNo
chargedNoWhen present on an error, false means the failed result is uncharged.
invoiceNo
messageNo
missingNo
paymentNo
pricingNo
privacyNo
receiptNo
settledNoWhen present on an error, false means no settlement occurred.
unknownNo
acceptedNo
contractNo
decisionNo
evidenceNo
supplierNo
validityNo
retryableNo
error_codeNo
extensionsNo
limitationsNo
status_codeNo
did_you_meanNo
next_actionsNo
missing_checksNo
policy_versionNo
partial_evidenceNo
source_snapshotsNo
evidence_coverageNo
input_fingerprintNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed19 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / oneOf
      Added value: +[
      +  {
      +    "required": [
      +      "invoice_xml"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "document_base64"
      +    ]
      +  }
      +]
    • removedInput schema / properties / b2b / title
      Removed value: -"B2B"
    • addedInput schema / properties / buyer_country / pattern
      Added value: +"^[A-Za-z]{2}$"
    • removedInput schema / properties / buyer_country / title
      Removed value: -"Buyer Country"
    • removedInput schema / properties / document_base64 / title
      Removed value: -"Document Base64"
    • removedInput schema / properties / expected_amount / title
      Removed value: -"Expected Amount"
    • removedInput schema / properties / expected_buyer_vat / title
      Removed value: -"Expected Buyer Vat"
    • addedInput schema / properties / expected_currency / pattern
      Added value: +"^[A-Za-z]{3}$"
    • removedInput schema / properties / expected_currency / title
      Removed value: -"Expected Currency"
    • removedInput schema / properties / expected_supplier_name / title
      Removed value: -"Expected Supplier Name"
    • removedInput schema / properties / expected_supplier_vat / title
      Removed value: -"Expected Supplier Vat"
    • removedInput schema / properties / filename / title
      Removed value: -"Filename"
    • removedInput schema / properties / invoice_xml / title
      Removed value: -"Invoice Xml"
    • removedInput schema / properties / purchase_order_reference / title
      Removed value: -"Purchase Order Reference"
    • removedInput schema / properties / supply_type / title
      Removed value: -"Supply Type"
    • removedInput schema / properties / trusted_payee_iban / title
      Removed value: -"Trusted Payee Iban"
    • removedInput schema / title
      Removed value: -"invoice_to_pay_dossier_toolArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "anyOf": [
      +    {
      +      "required": [
      +        "contract",
      +        "policy_version",
      +        "decision",
      +        "input_fingerprint",
      +        "invoice",
      +        "supplier",
      +        "payment",
      +        "checks",
      +        "evidence_coverage",
      +        "evidence",
      +        "source_snapshots",
      +        "next_actions",
      +        "validity",
      +        "limitations",
      +        "pricing",
      +        "privacy",
      +        "receipt",
      +        "extensions"
      +      ]
      +    },
      +    {
      +      "required": [
      +        "error"
      +      ]
      +    }
      +  ],
      +  "description": "Structured result contract for invoice_to_pay_dossier_eu. A success satisfies the documented success branch. A domain or tool error includes error and is not a successful settlement; unpaid x402 requirements are carried by the transport wrapper.",
      +  "properties": {
      +    "accepted": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "charged": {
      +      "description": "When present on an error, false means the failed result is uncharged.",
      +      "type": "boolean"
      +    },
      +    "checks": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "contract": {
      +      "type": "string"
      +    },
      +    "decision": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "did_you_mean": {
      +      "additionalProperties": true,
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "error": {
      +      "oneOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "additionalProperties": true,
      +          "properties": {
      +            "code": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "message": {
      +              "type": "string"
      +            },
      +            "param": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "type": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "message"
      +          ],
      +          "type": "object"
      +        }
      +      ]
      +    },
      +    "error_code": {
      +      "type": "string"
      +    },
      +    "evidence": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "evidence_coverage": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "extensions": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "delivery-receipt": {
      +          "additionalProperties": true,
      +          "properties": {
      +            "how_to_verify": {
      +              "type": "string"
      +            },
      +            "issued_at": {
      +              "format": "date-time",
      +              "type": "string"
      +            },
      +            "issuer": {
      +              "type": "string"
      +            },
      +            "issuer_key": {
      +              "type": "string"
      +            },
      +            "key_id": {
      +              "type": "string"
      +            },
      +            "result_hash": {
      +              "type": "string"
      +            },
      +            "service": {
      +              "type": "string"
      +            },
      +            "signature": {
      +              "type": "string"
      +            },
      +            "signed_message": {
      +              "type": "string"
      +            },
      +            "standard": {
      +              "const": "eucompliance-receipt/2",
      +              "type": "string"
      +            },
      +            "subject": {
      +              "type": "string"
      +            },
      +            "valid_until": {
      +              "format": "date-time",
      +              "type": "string"
      +            },
      +            "verify_url": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "standard",
      +            "service",
      +            "subject",
      +            "result_hash",
      +            "issued_at",
      +            "valid_until",
      +            "issuer",
      +            "issuer_key",
      +            "key_id",
      +            "verify_url",
      +            "how_to_verify",
      +            "signature",
      +            "signed_message"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "delivery-receipt"
      +      ],
      +      "type": "object"
      +    },
      +    "input_fingerprint": {
      +      "type": "string"
      +    },
      +    "invoice": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "limitations": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "missing": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "missing_checks": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "next_actions": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "partial_evidence": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "payment": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "policy_version": {
      +      "type": "string"
      +    },
      +    "pricing": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "privacy": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "receipt": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "how_to_verify": {
      +          "type": "string"
      +        },
      +        "issued_at": {
      +          "format": "date-time",
      +          "type": "string"
      +        },
      +        "issuer": {
      +          "type": "string"
      +        },
      +        "issuer_key": {
      +          "type": "string"
      +        },
      +        "key_id": {
      +          "type": "string"
      +        },
      +        "result_hash": {
      +          "type": "string"
      +        },
      +        "service": {
      +          "type": "string"
      +        },
      +        "signature": {
      +          "type": "string"
      +        },
      +        "signed_message": {
      +          "type": "string"
      +        },
      +        "standard": {
      +          "const": "eucompliance-receipt/2",
      +          "type": "string"
      +        },
      +        "subject": {
      +          "type": "string"
      +        },
      +        "valid_until": {
      +          "format": "date-time",
      +          "type": "string"
      +        },
      +        "verify_url": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "standard",
      +        "service",
      +        "subject",
      +        "result_hash",
      +        "issued_at",
      +        "valid_until",
      +        "issuer",
      +        "issuer_key",
      +        "key_id",
      +        "verify_url",
      +        "how_to_verify",
      +        "signature",
      +        "signed_message"
      +      ],
      +      "type": "object"
      +    },
      +    "retryable": {
      +      "type": "boolean"
      +    },
      +    "settled": {
      +      "description": "When present on an error, false means no settlement occurred.",
      +      "type": "boolean"
      +    },
      +    "source_snapshots": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "status_code": {
      +      "type": "integer"
      +    },
      +    "supplier": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "tool": {
      +      "type": "string"
      +    },
      +    "unknown": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "validity": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already state readOnlyHint=true and destructiveHint=false. The description adds valuable behavioral context: the READY_FOR_BUYER_APPROVAL outcome is explicitly limited (does not prove delivery, internal approval, duplicate-ledger status, or bank-account ownership), and the tool costs 1.00 USDC per completed dossier after a free input check. This goes beyond the schema and annotations and helps an agent set expectations.

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?

The description is dense but well-structured: it leads with the decision outcome, then input formats, then validation scope, then limitations, then cost/payment. Every sentence carries meaning, though it is a bit long and could be tightened in places without losing value.

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?

Given the output schema exists and the 13 parameters are mostly self-describing, the description covers the key behavioral context an agent needs: accepted formats, validation coverage, limitations of a positive verdict, and pricing. It is complete enough for a tool of this complexity, especially with readOnlyHint=true and an output schema present.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate. It explains the accepted input formats (UBL/CII XML or ZUGFeRD/Factur-X with one embedded invoice XML), clarifies the oneOf between invoice_xml and document_base64, and mentions trusted IBAN match, VIES, and VAT treatment. It gives the agent enough context to understand what the key parameters mean even though it doesn't enumerate every parameter.

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 tool's function: it evaluates an EU invoice before payment and returns one of three decisions (READY_FOR_BUYER_APPROVAL, HOLD_FOR_REVIEW, DO_NOT_PAY). It also distinguishes its input scope (UBL/CII XML or ZUGFeRD/Factur-X with embedded XML, not ordinary/scanned PDFs) from sibling tools like validate_einvoice_eu or must_verify_before_pay.

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?

The description gives explicit input requirements and scoping (accepts structured XML-based invoices, excludes PDFs), and notes a free input check first, which helps an agent decide when to call it. It does not explicitly name alternatives such as validate_einvoice_eu, but its unique decision-output and attached file requirements are sufficient for most selection contexts.

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.