Skip to main content
Glama

Agent Decision & Evidence Tools (MCP + x402)

Prepare EU Invoice Payment Guard (free)

prepare_invoice_to_pay_eu
Read-onlyIdempotent

FREE local input and safety check before purchase. Accepts UBL/CII XML or a base64 ZUGFeRD/Factur-X PDF with exactly one embedded invoice XML plus buyer country, expected amount/currency and a trusted payee IBAN. It checks format, limits and required context, but does not reveal the paid decision or query VIES/sanctions. Subject to daily abuse protection.

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
priceNoNo payment is required for this tool.
issuesNo
chargedNoWhen present on an error, false means the failed result is uncharged.
messageNo
missingNo
privacyNo
settledNoWhen present on an error, false means no settlement occurred.
unknownNo
acceptedNo
contractNo
coverageNo
detectedNo
purchaseNo
retryableNo
chargeableNo
error_codeNo
status_codeNo
did_you_meanNo
missing_checksNo
partial_evidenceNo
input_fingerprintNo
eligible_for_paid_dossierNo

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: -"prepare_invoice_to_pay_toolArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "anyOf": [
      +    {
      +      "required": [
      +        "contract",
      +        "chargeable",
      +        "eligible_for_paid_dossier",
      +        "issues",
      +        "purchase",
      +        "privacy",
      +        "price"
      +      ]
      +    },
      +    {
      +      "required": [
      +        "error"
      +      ]
      +    }
      +  ],
      +  "description": "Structured result contract for prepare_invoice_to_pay_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"
      +    },
      +    "chargeable": {
      +      "type": "boolean"
      +    },
      +    "charged": {
      +      "description": "When present on an error, false means the failed result is uncharged.",
      +      "type": "boolean"
      +    },
      +    "contract": {
      +      "type": "string"
      +    },
      +    "coverage": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "detected": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "did_you_mean": {
      +      "additionalProperties": true,
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "eligible_for_paid_dossier": {
      +      "type": "boolean"
      +    },
      +    "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"
      +    },
      +    "input_fingerprint": {
      +      "type": "string"
      +    },
      +    "issues": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "missing": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "missing_checks": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "partial_evidence": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "price": {
      +      "const": "free",
      +      "description": "No payment is required for this tool.",
      +      "type": "string"
      +    },
      +    "privacy": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "purchase": {
      +      "additionalProperties": true,
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "retryable": {
      +      "type": "boolean"
      +    },
      +    "settled": {
      +      "description": "When present on an error, false means no settlement occurred.",
      +      "type": "boolean"
      +    },
      +    "status_code": {
      +      "type": "integer"
      +    },
      +    "tool": {
      +      "type": "string"
      +    },
      +    "unknown": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations (readOnly, idempotent, non-destructive), the description adds significant behavioral detail: it is free, local, checks format/limits/context, does not perform VIES/sanctions lookups, does not return the paid decision, and is subject to daily abuse protection. This gives the agent a clear safety and side-effect profile.

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?

The description is three sentences with no filler. The core value proposition ('FREE local input and safety check before purchase') is front-loaded, followed by input requirements, behavioral limits, and rate-limit note. Every sentence earns its place.

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?

Given the tool's complexity (13 parameters, oneOf input, output schema), the description does a good job covering input formats, required parameters, behavioral boundaries, and rate limiting. It falls short only in not explaining optional parameters and not explicitly routing to siblings, but the output schema covers return values and the annotations cover safety.

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 description coverage is 0%, so the description must compensate. It explains the two input alternatives (invoice_xml vs document_base64), the ZUGFeRD/Factur-X requirement, and names the four required parameters. However, it does not describe optional fields like b2b, supply_type, expected_buyer_vat, expected_supplier_vat, expected_supplier_name, or purchase_order_reference, leaving their meaning and use unclear.

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 identifies the tool as a free local pre-purchase safety check for EU invoices, naming accepted formats (UBL/CII XML or embedded XML in PDF) and required context. It also distinguishes itself from paid decision tools and external vetting by stating it does not reveal the paid decision or query VIES/sanctions.

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 states the tool is intended 'before purchase' and clarifies what it is not for: it does not reveal the paid decision or query VIES/sanctions. This gives useful context for choosing it over siblings, though it does not explicitly name alternative tools or provide a clear when-not-to-use condition beyond these exclusions.

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.