Skip to main content
Glama

Allocate invoice quantities to a purchase order (paid)

match_invoice
Read-onlyIdempotent

USE THIS WHEN the question is a quantity-allocation question: how much of this PO has been invoiced, whether an invoice is fully, partially, or over billed against the PO, or how much quantity remains. Aggregates split invoice lines against one PO line and returns a status per line - fully_invoiced, partially_invoiced, uninvoiced, or overbilled - plus remaining quantity. Matches by explicit PO line ID or a unique exact product code only, never by description. Inputs: one invoice plus one PO; it does not accept a receipt. DO NOT USE THIS to compare a receipt against an invoice, or for a general list of differences with no allocation question - call reconcile_purchase_documents instead; it is free and does not require calling this tool first or after. Paid: 0.50 USDC per accepted comparison, explicit buyer-authorized x402 payment. Call get_document_service_status with service='invoice' first to confirm current readiness and price. Advisory output only: human review required; no delivery verification, payment execution, prior-invoice history, or accounting writes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoiceYes
purchase_orderYes
contract_versionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed3 schema fields changed
    • changedInput schema / properties / invoice / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "currency": {
      -        "enum": [
      -          "JPY"
      -        ],
      -        "type": "string"
      -      },
      -      "line_items": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "amount": {
      -              "maxLength": 26,
      -              "pattern": "^(?:0|[1-9][0-9]{0,25})(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "description": {
      -              "maxLength": 240,
      -              "minLength": 1,
      -              "type": "string"
      -            },
      -            "line_id": {
      -              "maxLength": 80,
      -              "minLength": 1,
      -              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "po_line_id": {
      -              "maxLength": 80,
      -              "minLength": 1,
      -              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "product_code": {
      -              "maxLength": 80,
      -              "minLength": 1,
      -              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "quantity": {
      -              "maxLength": 19,
      -              "not": {
      -                "pattern": "^0(?:\\.0+)?(?![\\s\\S])"
      -              },
      -              "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "unit": {
      -              "maxLength": 32,
      -              "minLength": 1,
      -              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "unit_price": {
      -              "maxLength": 19,
      -              "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])",
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "description",
      -            "line_id",
      -            "quantity",
      -            "unit",
      -            "unit_price"
      -          ],
      -          "type": "object"
      -        },
      -        "maxItems": 100,
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "purchase_order_reference": {
      -        "maxLength": 80,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "reference": {
      -        "maxLength": 80,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "subtotal": {
      -        "maxLength": 26,
      -        "pattern": "^(?:0|[1-9][0-9]{0,25})(?![\\s\\S])",
      -        "type": "string"
      -      },
      -      "supplier_id": {
      -        "maxLength": 80,
      -        "minLength": 1,
      -        "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -        "type": "string"
      -      },
      -      "tax": {
      -        "maxLength": 26,
      -        "pattern": "^(?:0|[1-9][0-9]{0,25})(?![\\s\\S])",
      -        "type": "string"
      -      },
      -      "total": {
      -        "maxLength": 26,
      -        "pattern": "^(?:0|[1-9][0-9]{0,25})(?![\\s\\S])",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "currency",
      -      "line_items",
      -      "purchase_order_reference",
      -      "reference",
      -      "supplier_id"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "currency": {
      -        "enum": [
      -          "USD",
      -          "EUR",
      -          "GBP",
      -          "CAD",
      -          "AUD",
      -          "MXN"
      -        ],
      -        "type": "string"
      -      },
      -      "line_items": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "amount": {
      -              "maxLength": 29,
      -              "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "description": {
      -              "maxLength": 240,
      -              "minLength": 1,
      -              "type": "string"
      -            },
      -            "line_id": {
      -              "maxLength": 80,
      -              "minLength": 1,
      -              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "po_line_id": {
      -              "maxLength": 80,
      -              "minLength": 1,
      -              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "product_code": {
      -              "maxLength": 80,
      -              "minLength": 1,
      -              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "quantity": {
      -              "maxLength": 19,
      -              "not": {
      -                "pattern": "^0(?:\\.0+)?(?![\\s\\S])"
      -              },
      -              "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "unit": {
      -              "maxLength": 32,
      -              "minLength": 1,
      -              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "unit_price": {
      -              "maxLength": 19,
      -              "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])",
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "description",
      -            "line_id",
      -            "quantity",
      -            "unit",
      -            "unit_price"
      -          ],
      -          "type": "object"
      -        },
      -        "maxItems": 100,
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "purchase_order_reference": {
      -        "maxLength": 80,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "reference": {
      -        "maxLength": 80,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "subtotal": {
      -        "maxLength": 29,
      -        "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?(?![\\s\\S])",
      -        "type": "string"
      -      },
      -      "supplier_id": {
      -        "maxLength": 80,
      -        "minLength": 1,
      -        "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -        "type": "string"
      -      },
      -      "tax": {
      -        "maxLength": 29,
      -        "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?(?![\\s\\S])",
      -        "type": "string"
      -      },
      -      "total": {
      -        "maxLength": 29,
      -        "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?(?![\\s\\S])",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "currency",
      -      "line_items",
      -      "purchase_order_reference",
      -      "reference",
      -      "supplier_id"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "currency": {
      +        "enum": [
      +          "JPY"
      +        ],
      +        "type": "string"
      +      },
      +      "line_items": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "amount": {
      +              "maxLength": 26,
      +              "pattern": "^(?:0|[1-9][0-9]{0,25})$",
      +              "type": "string"
      +            },
      +            "description": {
      +              "maxLength": 240,
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "line_id": {
      +              "maxLength": 80,
      +              "minLength": 1,
      +              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +              "type": "string"
      +            },
      +            "po_line_id": {
      +              "maxLength": 80,
      +              "minLength": 1,
      +              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +              "type": "string"
      +            },
      +            "product_code": {
      +              "maxLength": 80,
      +              "minLength": 1,
      +              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +              "type": "string"
      +            },
      +            "quantity": {
      +              "allOf": [
      +                {
      +                  "not": {
      +                    "pattern": "^0(?:\\.0+)?$"
      +                  }
      +                }
      +              ],
      +              "maxLength": 19,
      +              "not": {
      +                "pattern": "\\n"
      +              },
      +              "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$",
      +              "type": "string"
      +            },
      +            "unit": {
      +              "maxLength": 32,
      +              "minLength": 1,
      +              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +              "type": "string"
      +            },
      +            "unit_price": {
      +              "maxLength": 19,
      +              "not": {
      +                "pattern": "\\n"
      +              },
      +              "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "description",
      +            "line_id",
      +            "quantity",
      +            "unit",
      +            "unit_price"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 100,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "purchase_order_reference": {
      +        "maxLength": 80,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "reference": {
      +        "maxLength": 80,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "subtotal": {
      +        "maxLength": 26,
      +        "pattern": "^(?:0|[1-9][0-9]{0,25})$",
      +        "type": "string"
      +      },
      +      "supplier_id": {
      +        "maxLength": 80,
      +        "minLength": 1,
      +        "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +        "type": "string"
      +      },
      +      "tax": {
      +        "maxLength": 26,
      +        "pattern": "^(?:0|[1-9][0-9]{0,25})$",
      +        "type": "string"
      +      },
      +      "total": {
      +        "maxLength": 26,
      +        "pattern": "^(?:0|[1-9][0-9]{0,25})$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "currency",
      +      "line_items",
      +      "purchase_order_reference",
      +      "reference",
      +      "supplier_id"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "currency": {
      +        "enum": [
      +          "USD",
      +          "EUR",
      +          "GBP",
      +          "CAD",
      +          "AUD",
      +          "MXN"
      +        ],
      +        "type": "string"
      +      },
      +      "line_items": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "amount": {
      +              "maxLength": 29,
      +              "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$",
      +              "type": "string"
      +            },
      +            "description": {
      +              "maxLength": 240,
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "line_id": {
      +              "maxLength": 80,
      +              "minLength": 1,
      +              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +              "type": "string"
      +            },
      +            "po_line_id": {
      +              "maxLength": 80,
      +              "minLength": 1,
      +              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +              "type": "string"
      +            },
      +            "product_code": {
      +              "maxLength": 80,
      +              "minLength": 1,
      +              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +              "type": "string"
      +            },
      +            "quantity": {
      +              "allOf": [
      +                {
      +                  "not": {
      +                    "pattern": "^0(?:\\.0+)?$"
      +                  }
      +                }
      +              ],
      +              "maxLength": 19,
      +              "not": {
      +                "pattern": "\\n"
      +              },
      +              "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$",
      +              "type": "string"
      +            },
      +            "unit": {
      +              "maxLength": 32,
      +              "minLength": 1,
      +              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +              "type": "string"
      +            },
      +            "unit_price": {
      +              "maxLength": 19,
      +              "not": {
      +                "pattern": "\\n"
      +              },
      +              "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "description",
      +            "line_id",
      +            "quantity",
      +            "unit",
      +            "unit_price"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 100,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "purchase_order_reference": {
      +        "maxLength": 80,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "reference": {
      +        "maxLength": 80,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "subtotal": {
      +        "maxLength": 29,
      +        "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$",
      +        "type": "string"
      +      },
      +      "supplier_id": {
      +        "maxLength": 80,
      +        "minLength": 1,
      +        "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +        "type": "string"
      +      },
      +      "tax": {
      +        "maxLength": 29,
      +        "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$",
      +        "type": "string"
      +      },
      +      "total": {
      +        "maxLength": 29,
      +        "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "currency",
      +      "line_items",
      +      "purchase_order_reference",
      +      "reference",
      +      "supplier_id"
      +    ],
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / purchase_order / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "currency": {
      -        "enum": [
      -          "JPY"
      -        ],
      -        "type": "string"
      -      },
      -      "line_items": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "amount": {
      -              "maxLength": 26,
      -              "pattern": "^(?:0|[1-9][0-9]{0,25})(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "description": {
      -              "maxLength": 240,
      -              "minLength": 1,
      -              "type": "string"
      -            },
      -            "line_id": {
      -              "maxLength": 80,
      -              "minLength": 1,
      -              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "product_code": {
      -              "maxLength": 80,
      -              "minLength": 1,
      -              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "quantity": {
      -              "maxLength": 19,
      -              "not": {
      -                "pattern": "^0(?:\\.0+)?(?![\\s\\S])"
      -              },
      -              "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "unit": {
      -              "maxLength": 32,
      -              "minLength": 1,
      -              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "unit_price": {
      -              "maxLength": 19,
      -              "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])",
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "description",
      -            "line_id",
      -            "quantity",
      -            "unit",
      -            "unit_price"
      -          ],
      -          "type": "object"
      -        },
      -        "maxItems": 100,
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "reference": {
      -        "maxLength": 80,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "supplier_id": {
      -        "maxLength": 80,
      -        "minLength": 1,
      -        "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "currency",
      -      "line_items",
      -      "reference",
      -      "supplier_id"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "currency": {
      -        "enum": [
      -          "USD",
      -          "EUR",
      -          "GBP",
      -          "CAD",
      -          "AUD",
      -          "MXN"
      -        ],
      -        "type": "string"
      -      },
      -      "line_items": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "amount": {
      -              "maxLength": 29,
      -              "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "description": {
      -              "maxLength": 240,
      -              "minLength": 1,
      -              "type": "string"
      -            },
      -            "line_id": {
      -              "maxLength": 80,
      -              "minLength": 1,
      -              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "product_code": {
      -              "maxLength": 80,
      -              "minLength": 1,
      -              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "quantity": {
      -              "maxLength": 19,
      -              "not": {
      -                "pattern": "^0(?:\\.0+)?(?![\\s\\S])"
      -              },
      -              "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "unit": {
      -              "maxLength": 32,
      -              "minLength": 1,
      -              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "unit_price": {
      -              "maxLength": 19,
      -              "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])",
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "description",
      -            "line_id",
      -            "quantity",
      -            "unit",
      -            "unit_price"
      -          ],
      -          "type": "object"
      -        },
      -        "maxItems": 100,
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "reference": {
      -        "maxLength": 80,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "supplier_id": {
      -        "maxLength": 80,
      -        "minLength": 1,
      -        "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "currency",
      -      "line_items",
      -      "reference",
      -      "supplier_id"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "currency": {
      +        "enum": [
      +          "JPY"
      +        ],
      +        "type": "string"
      +      },
      +      "line_items": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "amount": {
      +              "maxLength": 26,
      +              "pattern": "^(?:0|[1-9][0-9]{0,25})$",
      +              "type": "string"
      +            },
      +            "description": {
      +              "maxLength": 240,
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "line_id": {
      +              "maxLength": 80,
      +              "minLength": 1,
      +              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +              "type": "string"
      +            },
      +            "product_code": {
      +              "maxLength": 80,
      +              "minLength": 1,
      +              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +              "type": "string"
      +            },
      +            "quantity": {
      +              "allOf": [
      +                {
      +                  "not": {
      +                    "pattern": "^0(?:\\.0+)?$"
      +                  }
      +                }
      +              ],
      +              "maxLength": 19,
      +              "not": {
      +                "pattern": "\\n"
      +              },
      +              "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$",
      +              "type": "string"
      +            },
      +            "unit": {
      +              "maxLength": 32,
      +              "minLength": 1,
      +              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +              "type": "string"
      +            },
      +            "unit_price": {
      +              "maxLength": 19,
      +              "not": {
      +                "pattern": "\\n"
      +              },
      +              "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "description",
      +            "line_id",
      +            "quantity",
      +            "unit",
      +            "unit_price"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 100,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "reference": {
      +        "maxLength": 80,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "supplier_id": {
      +        "maxLength": 80,
      +        "minLength": 1,
      +        "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "currency",
      +      "line_items",
      +      "reference",
      +      "supplier_id"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "currency": {
      +        "enum": [
      +          "USD",
      +          "EUR",
      +          "GBP",
      +          "CAD",
      +          "AUD",
      +          "MXN"
      +        ],
      +        "type": "string"
      +      },
      +      "line_items": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "amount": {
      +              "maxLength": 29,
      +              "pattern": "^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,2})?$",
      +              "type": "string"
      +            },
      +            "description": {
      +              "maxLength": 240,
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "line_id": {
      +              "maxLength": 80,
      +              "minLength": 1,
      +              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +              "type": "string"
      +            },
      +            "product_code": {
      +              "maxLength": 80,
      +              "minLength": 1,
      +              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +              "type": "string"
      +            },
      +            "quantity": {
      +              "allOf": [
      +                {
      +                  "not": {
      +                    "pattern": "^0(?:\\.0+)?$"
      +                  }
      +                }
      +              ],
      +              "maxLength": 19,
      +              "not": {
      +                "pattern": "\\n"
      +              },
      +              "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$",
      +              "type": "string"
      +            },
      +            "unit": {
      +              "maxLength": 32,
      +              "minLength": 1,
      +              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +              "type": "string"
      +            },
      +            "unit_price": {
      +              "maxLength": 19,
      +              "not": {
      +                "pattern": "\\n"
      +              },
      +              "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "description",
      +            "line_id",
      +            "quantity",
      +            "unit",
      +            "unit_price"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 100,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "reference": {
      +        "maxLength": 80,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "supplier_id": {
      +        "maxLength": 80,
      +        "minLength": 1,
      +        "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "currency",
      +      "line_items",
      +      "reference",
      +      "supplier_id"
      +    ],
      +    "type": "object"
      +  }
      +]
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "$schema": "https://json-schema.org/draft/2020-12/schema",
      -    "additionalProperties": false,
      -    "properties": {
      -      "contract_version": {
      -        "const": "ardaro.agent-invoice-matching.response.v1"
      -      },
      -      "identities": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "analysis_result_identity": {
      -            "pattern": "^res_[0-9a-f]{64}(?![\\s\\S])",
      -            "type": "string"
      -          },
      -          "payment_identity": {
      -            "additionalProperties": false,
      -            "properties": {
      -              "protocol": {
      -                "const": "x402-v2"
      -              },
      -              "reference": {
      -                "pattern": "^pay_[0-9a-f]{64}(?![\\s\\S])",
      -                "type": "string"
      -              },
      -              "replayed": {
      -                "type": "boolean"
      -              }
      -            },
      -            "required": [
      -              "protocol",
      -              "reference",
      -              "replayed"
      -            ],
      -            "type": "object"
      -          }
      -        },
      -        "required": [
      -          "analysis_result_identity"
      -        ],
      -        "type": "object"
      -      },
      -      "result": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "arithmetic": {
      -            "additionalProperties": false,
      -            "properties": {
      -              "computed_invoice_total": {
      -                "anyOf": [
      -                  {
      -                    "maxLength": 42,
      -                    "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])",
      -                    "type": "string"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ]
      -              },
      -              "invoice_currency_scale": {
      -                "enum": [
      -                  0,
      -                  2
      -                ]
      -              },
      -              "invoice_line_amount_sum": {
      -                "maxLength": 42,
      -                "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])",
      -                "type": "string"
      -              },
      -              "invoice_subtotal": {
      -                "anyOf": [
      -                  {
      -                    "maxLength": 42,
      -                    "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])",
      -                    "type": "string"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ]
      -              },
      -              "invoice_subtotal_status": {
      -                "enum": [
      -                  "consistent",
      -                  "mismatch",
      -                  "unavailable"
      -                ]
      -              },
      -              "invoice_supplied_line_amount_sum": {
      -                "anyOf": [
      -                  {
      -                    "maxLength": 42,
      -                    "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])",
      -                    "type": "string"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ]
      -              },
      -              "invoice_tax": {
      -                "anyOf": [
      -                  {
      -                    "maxLength": 42,
      -                    "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])",
      -                    "type": "string"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ]
      -              },
      -              "invoice_total": {
      -                "anyOf": [
      -                  {
      -                    "maxLength": 42,
      -                    "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])",
      -                    "type": "string"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ]
      -              },
      -              "invoice_total_status": {
      -                "enum": [
      -                  "consistent",
      -                  "mismatch",
      -                  "unavailable"
      -                ]
      -              },
      -              "purchase_order_currency_scale": {
      -                "enum": [
      -                  0,
      -                  2
      -                ]
      -              },
      -              "rounding_mode": {
      -                "const": "ROUND_HALF_UP"
      -              },
      -              "rounding_scope": {
      -                "const": "each_line_then_sum"
      -              }
      -            },
      -            "required": [
      -              "rounding_mode",
      -              "rounding_scope",
      -              "invoice_currency_scale",
      -              "purchase_order_currency_scale",
      -              "invoice_line_amount_sum",
      -              "invoice_supplied_line_amount_sum",
      -              "invoice_subtotal",
      -              "invoice_tax",
      -              "invoice_total",
      -              "computed_invoice_total",
      -              "invoice_subtotal_status",
      -              "invoice_total_status"
      -            ],
      -            "type": "object"
      -          },
      -          "comparison_rows": {
      -            "items": {
      -              "additionalProperties": false,
      -              "properties": {
      -                "allocation_status": {
      -                  "enum": [
      -                    "allocated",
      -                    "not_comparable",
      -                    "unmatched"
      -                  ]
      -                },
      -                "computed_invoice_amount": {
      -                  "maxLength": 42,
      -                  "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])",
      -                  "type": "string"
      -                },
      -                "discrepancy_codes": {
      -                  "items": {
      -                    "enum": [
      -                      "currency_mismatch",
      -                      "supplier_mismatch",
      -                      "purchase_order_reference_mismatch",
      -                      "invoice_line_amount_unavailable",
      -                      "purchase_order_line_amount_unavailable",
      -                      "invoice_line_arithmetic_mismatch",
      -                      "purchase_order_line_arithmetic_mismatch",
      -                      "referenced_purchase_order_line_missing",
      -                      "ambiguous_product_code",
      -                      "unmatchable_invoice_line",
      -                      "unit_mismatch",
      -                      "product_code_mismatch",
      -                      "unit_price_mismatch",
      -                      "quantity_exceeds_purchase_order",
      -                      "invoice_subtotal_unavailable",
      -                      "invoice_tax_unavailable",
      -                      "invoice_total_unavailable",
      -                      "invoice_subtotal_mismatch",
      -                      "invoice_supplied_line_sum_mismatch",
      -                      "invoice_total_mismatch"
      -                    ],
      -                    "type": "string"
      -                  },
      -                  "maxItems": 20,
      -                  "minItems": 0,
      -                  "type": "array",
      -                  "uniqueItems": true
      -                },
      -                "invoice_amount": {
      -                  "anyOf": [
      -                    {
      -                      "maxLength": 42,
      -                      "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])",
      -                      "type": "string"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ]
      -                },
      -                "invoice_currency": {
      -                  "enum": [
      -                    "USD",
      -                    "EUR",
      -                    "GBP",
      -                    "CAD",
      -                    "AUD",
      -                    "MXN",
      -                    "JPY"
      -                  ]
      -                },
      -                "invoice_line_id": {
      -                  "maxLength": 80,
      -                  "minLength": 1,
      -                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -                  "type": "string"
      -                },
      -                "invoice_quantity": {
      -                  "maxLength": 42,
      -                  "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])",
      -                  "type": "string"
      -                },
      -                "invoice_source": {
      -                  "maxLength": 100,
      -                  "minLength": 1,
      -                  "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])",
      -                  "type": "string"
      -                },
      -                "invoice_unit": {
      -                  "maxLength": 32,
      -                  "minLength": 1,
      -                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -                  "type": "string"
      -                },
      -                "invoice_unit_price": {
      -                  "maxLength": 42,
      -                  "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])",
      -                  "type": "string"
      -                },
      -                "line_arithmetic_status": {
      -                  "enum": [
      -                    "consistent",
      -                    "mismatch",
      -                    "unavailable"
      -                  ]
      -                },
      -                "match_method": {
      -                  "enum": [
      -                    "unmatched",
      -                    "explicit_po_line_id",
      -                    "exact_product_code"
      -                  ]
      -                },
      -                "outcome": {
      -                  "enum": [
      -                    "no_discrepancies",
      -                    "review_required"
      -                  ]
      -                },
      -                "purchase_order_currency": {
      -                  "enum": [
      -                    "USD",
      -                    "EUR",
      -                    "GBP",
      -                    "CAD",
      -                    "AUD",
      -                    "MXN",
      -                    "JPY"
      -                  ]
      -                },
      -                "purchase_order_line_id": {
      -                  "anyOf": [
      -                    {
      -                      "maxLength": 80,
      -                      "minLength": 1,
      -                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -                      "type": "string"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ]
      -                },
      -                "purchase_order_quantity": {
      -                  "anyOf": [
      -                    {
      -                      "maxLength": 42,
      -                      "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])",
      -                      "type": "string"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ]
      -                },
      -                "purchase_order_source": {
      -                  "anyOf": [
      -                    {
      -                      "maxLength": 100,
      -                      "minLength": 1,
      -                      "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])",
      -                      "type": "string"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ]
      -                },
      -                "purchase_order_unit": {
      -                  "anyOf": [
      -                    {
      -                      "maxLength": 32,
      -                      "minLength": 1,
      -                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -                      "type": "string"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ]
      -                },
      -                "purchase_order_unit_price": {
      -                  "anyOf": [
      -                    {
      -                      "maxLength": 42,
      -                      "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])",
      -                      "type": "string"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ]
      -                },
      -                "unit_price_difference": {
      -                  "anyOf": [
      -                    {
      -                      "maxLength": 42,
      -                      "pattern": "^-?(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])",
      -                      "type": "string"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ]
      -                }
      -              },
      -              "required": [
      -                "invoice_line_id",
      -                "invoice_source",
      -                "purchase_order_line_id",
      -                "purchase_order_source",
      -                "match_method",
      -                "allocation_status",
      -                "invoice_quantity",
      -                "purchase_order_quantity",
      -                "invoice_unit",
      -                "purchase_order_unit",
      -                "invoice_unit_price",
      -                "purchase_order_unit_price",
      -                "invoice_currency",
      -                "purchase_order_currency",
      -                "unit_price_difference",
      -                "invoice_amount",
      -                "computed_invoice_amount",
      -                "line_arithmetic_status",
      -                "discrepancy_codes",
      -                "outcome"
      -              ],
      -              "type": "object"
      -            },
      -            "maxItems": 100,
      -            "minItems": 1,
      -            "type": "array"
      -          },
      -          "discrepancies": {
      -            "items": {
      -              "additionalProperties": false,
      -              "properties": {
      -                "code": {
      -                  "enum": [
      -                    "currency_mismatch",
      -                    "supplier_mismatch",
      -                    "purchase_order_reference_mismatch",
      -                    "invoice_line_amount_unavailable",
      -                    "purchase_order_line_amount_unavailable",
      -                    "invoice_line_arithmetic_mismatch",
      -                    "purchase_order_line_arithmetic_mismatch",
      -                    "referenced_purchase_order_line_missing",
      -                    "ambiguous_product_code",
      -                    "unmatchable_invoice_line",
      -                    "unit_mismatch",
      -                    "product_code_mismatch",
      -                    "unit_price_mismatch",
      -                    "quantity_exceeds_purchase_order",
      -                    "invoice_subtotal_unavailable",
      -                    "invoice_tax_unavailable",
      -                    "invoice_total_unavailable",
      -                    "invoice_subtotal_mismatch",
      -                    "invoice_supplied_line_sum_mismatch",
      -                    "invoice_total_mismatch"
      -                  ],
      -                  "type": "string"
      -                },
      -                "message": {
      -                  "maxLength": 240,
      -                  "minLength": 1,
      -                  "type": "string"
      -                },
      -                "severity": {
      -                  "enum": [
      -                    "error",
      -                    "warning"
      -                  ]
      -                },
      -                "sources": {
      -                  "items": {
      -                    "maxLength": 100,
      -                    "minLength": 1,
      -                    "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])",
      -                    "type": "string"
      -                  },
      -                  "maxItems": 101,
      -                  "minItems": 1,
      -                  "type": "array"
      -                }
      -              },
      -              "required": [
      -                "code",
      -                "severity",
      -                "message",
      -                "sources"
      -              ],
      -              "type": "object"
      -            },
      -            "maxItems": 1000,
      -            "minItems": 0,
      -            "type": "array"
      -          },
      -          "document_checks": {
      -            "additionalProperties": false,
      -            "properties": {
      -              "currency_matches": {
      -                "type": "boolean"
      -              },
      -              "purchase_order_reference_matches": {
      -                "type": "boolean"
      -              },
      -              "supplier_matches": {
      -                "type": "boolean"
      -              }
      -            },
      -            "required": [
      -              "currency_matches",
      -              "supplier_matches",
      -              "purchase_order_reference_matches"
      -            ],
      -            "type": "object"
      -          },
      -          "policy": {
      -            "additionalProperties": false,
      -            "properties": {
      -              "arithmetic_scope": {
      -                "maxLength": 300,
      -                "minLength": 1,
      -                "type": "string"
      -              },
      -              "decision_scope": {
      -                "maxLength": 300,
      -                "minLength": 1,
      -                "type": "string"
      -              },
      -              "delivery_verification_supported": {
      -                "const": false
      -              },
      -              "financial_posting_performed": {
      -                "const": false
      -              },
      -              "financial_posting_supported": {
      -                "const": false
      -              },
      -              "human_review_required": {
      -                "const": true
      -              },
      -              "identity_purpose": {
      -                "const": "deterministic_result_comparison_only"
      -              },
      -              "matching_rule": {
      -                "const": "explicit_po_line_id_else_unique_case_sensitive_product_code"
      -              },
      -              "model_calls": {
      -                "const": 0
      -              },
      -              "payment_approval_supported": {
      -                "const": false
      -              },
      -              "quantity_scope": {
      -                "maxLength": 300,
      -                "minLength": 1,
      -                "type": "string"
      -              },
      -              "raw_documents_retained": {
      -                "const": false
      -              },
      -              "stateless": {
      -                "const": true
      -              },
      -              "supplier_scope": {
      -                "maxLength": 300,
      -                "minLength": 1,
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "human_review_required",
      -              "stateless",
      -              "raw_documents_retained",
      -              "financial_posting_supported",
      -              "financial_posting_performed",
      -              "payment_approval_supported",
      -              "delivery_verification_supported",
      -              "model_calls",
      -              "identity_purpose",
      -              "matching_rule",
      -              "quantity_scope",
      -              "arithmetic_scope",
      -              "supplier_scope",
      -              "decision_scope"
      -            ],
      -            "type": "object"
      -          },
      -          "purchase_order_line_summary": {
      -            "items": {
      -              "additionalProperties": false,
      -              "properties": {
      -                "allocated_invoice_sources": {
      -                  "items": {
      -                    "maxLength": 100,
      -                    "minLength": 1,
      -                    "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])",
      -                    "type": "string"
      -                  },
      -                  "maxItems": 100,
      -                  "minItems": 0,
      -                  "type": "array"
      -                },
      -                "allocated_quantity": {
      -                  "anyOf": [
      -                    {
      -                      "maxLength": 42,
      -                      "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])",
      -                      "type": "string"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ]
      -                },
      -                "computed_amount": {
      -                  "maxLength": 42,
      -                  "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])",
      -                  "type": "string"
      -                },
      -                "line_arithmetic_status": {
      -                  "enum": [
      -                    "consistent",
      -                    "mismatch",
      -                    "unavailable"
      -                  ]
      -                },
      -                "ordered_quantity": {
      -                  "maxLength": 42,
      -                  "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])",
      -                  "type": "string"
      -                },
      -                "overbilled_quantity": {
      -                  "anyOf": [
      -                    {
      -                      "maxLength": 42,
      -                      "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])",
      -                      "type": "string"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ]
      -                },
      -                "purchase_order_line_id": {
      -                  "maxLength": 80,
      -                  "minLength": 1,
      -                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -                  "type": "string"
      -                },
      -                "purchase_order_source": {
      -                  "maxLength": 100,
      -                  "minLength": 1,
      -                  "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])",
      -                  "type": "string"
      -                },
      -                "status": {
      -                  "enum": [
      -                    "not_comparable",
      -                    "not_invoiced",
      -                    "overbilled",
      -                    "fully_invoiced",
      -                    "partially_invoiced"
      -                  ]
      -                },
      -                "supplied_amount": {
      -                  "anyOf": [
      -                    {
      -                      "maxLength": 42,
      -                      "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])",
      -                      "type": "string"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ]
      -                },
      -                "uninvoiced_quantity": {
      -                  "anyOf": [
      -                    {
      -                      "maxLength": 42,
      -                      "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])",
      -                      "type": "string"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ]
      -                },
      -                "unit": {
      -                  "maxLength": 32,
      -                  "minLength": 1,
      -                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])",
      -                  "type": "string"
      -                }
      -              },
      -              "required": [
      -                "purchase_order_line_id",
      -                "purchase_order_source",
      -                "allocated_invoice_sources",
      -                "ordered_quantity",
      -                "allocated_quantity",
      -                "uninvoiced_quantity",
      -                "overbilled_quantity",
      -                "unit",
      -                "status",
      -                "supplied_amount",
      -                "computed_amount",
      -                "line_arithmetic_status"
      -              ],
      -              "type": "object"
      -            },
      -            "maxItems": 100,
      -            "minItems": 1,
      -            "type": "array"
      -          },
      -          "summary": {
      -            "additionalProperties": false,
      -            "properties": {
      -              "delivery_verified": {
      -                "const": false
      -              },
      -              "discrepancy_count": {
      -                "maximum": 1000,
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "human_review_required": {
      -                "const": true
      -              },
      -              "invoice_line_count": {
      -                "maximum": 100,
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "matched_invoice_line_count": {
      -                "maximum": 100,
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "outcome": {
      -                "enum": [
      -                  "no_discrepancies",
      -                  "review_required"
      -                ]
      -              },
      -              "payment_approved": {
      -                "const": false
      -              },
      -              "purchase_order_line_count": {
      -                "maximum": 100,
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "unknown_check_count": {
      -                "maximum": 1000,
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "unmatched_invoice_line_count": {
      -                "maximum": 100,
      -                "minimum": 0,
      -                "type": "integer"
      -              }
      -            },
      -            "required": [
      -              "outcome",
      -              "invoice_line_count",
      -              "purchase_order_line_count",
      -              "matched_invoice_line_count",
      -              "unmatched_invoice_line_count",
      -              "discrepancy_count",
      -              "unknown_check_count",
      -              "human_review_required",
      -              "delivery_verified",
      -              "payment_approved"
      -            ],
      -            "type": "object"
      -          }
      -        },
      -        "required": [
      -          "summary",
      -          "document_checks",
      -          "comparison_rows",
      -          "purchase_order_line_summary",
      -          "discrepancies",
      -          "arithmetic",
      -          "policy"
      -        ],
      -        "type": "object"
      -      },
      -      "status": {
      -        "const": "review_required"
      -      }
      -    },
      -    "required": [
      -      "contract_version",
      -      "status",
      -      "result",
      -      "identities"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "contract_version": {
      -        "const": "ardaro.agent-invoice-matching.response.v1"
      -      },
      -      "error": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "code": {
      -            "maxLength": 100,
      -            "type": "string"
      -          },
      -          "message": {
      -            "maxLength": 300,
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "code",
      -          "message"
      -        ],
      -        "type": "object"
      -      },
      -      "status": {
      -        "const": "error"
      -      }
      -    },
      -    "required": [
      -      "contract_version",
      -      "status",
      -      "error"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "$schema": "https://json-schema.org/draft/2020-12/schema",
      -    "additionalProperties": false,
      -    "properties": {
      -      "contract_version": {
      -        "const": "ardaro.agent-receipt-intelligence.response.v1"
      -      },
      -      "error": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "code": {
      -            "maxLength": 80,
      -            "type": "string"
      -          },
      -          "message": {
      -            "maxLength": 280,
      -            "type": "string"
      -          },
      -          "remediation": {
      -            "maxLength": 280,
      -            "type": "string"
      -          },
      -          "retryable": {
      -            "type": "boolean"
      -          },
      -          "service_code": {
      -            "enum": [
      -              "ARDARO_ARITHMETIC_MISMATCH",
      -              "ARDARO_DOCUMENT_TOO_LARGE",
      -              "ARDARO_DUPLICATE_SUSPECTED",
      -              "ARDARO_EXTRACTION_LOW_CONFIDENCE",
      -              "ARDARO_IDEMPOTENCY_CONFLICT",
      -              "ARDARO_INPUT_UNSUPPORTED",
      -              "ARDARO_PAYMENT_INVALID",
      -              "ARDARO_PAYMENT_RECONCILIATION_REQUIRED",
      -              "ARDARO_PAYMENT_REQUIRED",
      -              "ARDARO_RATE_LIMITED",
      -              "ARDARO_SERVICE_UNAVAILABLE"
      -            ]
      -          }
      -        },
      -        "required": [
      -          "code",
      -          "service_code",
      -          "message",
      -          "retryable",
      -          "remediation"
      -        ],
      -        "type": "object"
      -      },
      -      "status": {
      -        "const": "error"
      -      }
      -    },
      -    "required": [
      -      "contract_version",
      -      "status",
      -      "error"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "$schema": "https://json-schema.org/draft/2020-12/schema",
      -    "additionalProperties": false,
      -    "properties": {
      -      "contract_version": {
      -        "const": "ardaro.agent-receipt-intelligence.response.v1"
      -      },
      -      "error": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "code": {
      -            "maxLength": 80,
      -            "minLength": 1,
      -            "type": "string"
      -          },
      -          "message": {
      -            "const": "Service is not ready."
      -          }
      -        },
      -        "required": [
      -          "code",
      -          "message"
      -        ],
      -        "type": "object"
      -      },
      -      "service": {
      -        "const": "ardaro-receipt-intelligence"
      -      },
      -      "status": {
      -        "const": "not_ready"
      -      }
      -    },
      -    "required": [
      -      "contract_version",
      -      "status",
      -      "service",
      -      "error"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "$schema": "https://json-schema.org/draft/2020-12/schema",
      -    "properties": {
      -      "accepts": {
      -        "items": {
      -          "properties": {
      -            "amount": {
      -              "type": "string"
      -            },
      -            "asset": {
      -              "type": "string"
      -            },
      -            "extra": {
      -              "additionalProperties": true,
      -              "type": "object"
      -            },
      -            "maxTimeoutSeconds": {
      -              "type": "integer"
      -            },
      -            "network": {
      -              "type": "string"
      -            },
      -            "payTo": {
      -              "type": "string"
      -            },
      -            "scheme": {
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "scheme",
      -            "network",
      -            "asset",
      -            "amount",
      -            "payTo",
      -            "maxTimeoutSeconds"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "error": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "extensions": {
      -        "oneOf": [
      -          {
      -            "additionalProperties": true,
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "resource": {
      -        "oneOf": [
      -          {
      -            "properties": {
      -              "description": {
      -                "type": [
      -                  "string",
      -                  "null"
      -                ]
      -              },
      -              "iconUrl": {
      -                "type": [
      -                  "string",
      -                  "null"
      -                ]
      -              },
      -              "mimeType": {
      -                "type": [
      -                  "string",
      -                  "null"
      -                ]
      -              },
      -              "serviceName": {
      -                "type": [
      -                  "string",
      -                  "null"
      -                ]
      -              },
      -              "tags": {
      -                "oneOf": [
      -                  {
      -                    "items": {
      -                      "type": "string"
      -                    },
      -                    "type": "array"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ]
      -              },
      -              "url": {
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "url"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "x402Version": {
      -        "const": 2,
      -        "default": 2,
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "accepts"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "$schema": "https://json-schema.org/draft/2020-12/schema",
      -    "additionalProperties": false,
      -    "properties": {
      -      "error": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "error"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "message": {
      -        "type": "string"
      -      },
      -      "status": {
      -        "const": "error"
      -      }
      -    },
      -    "required": [
      -      "status",
      -      "message"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "$schema": "https://json-schema.org/draft/2020-12/schema",
      +    "additionalProperties": false,
      +    "properties": {
      +      "contract_version": {
      +        "const": "ardaro.agent-invoice-matching.response.v1"
      +      },
      +      "identities": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "analysis_result_identity": {
      +            "pattern": "^res_[0-9a-f]{64}$",
      +            "type": "string"
      +          },
      +          "payment_identity": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "protocol": {
      +                "const": "x402-v2"
      +              },
      +              "reference": {
      +                "pattern": "^pay_[0-9a-f]{64}$",
      +                "type": "string"
      +              },
      +              "replayed": {
      +                "type": "boolean"
      +              }
      +            },
      +            "required": [
      +              "protocol",
      +              "reference",
      +              "replayed"
      +            ],
      +            "type": "object"
      +          }
      +        },
      +        "required": [
      +          "analysis_result_identity"
      +        ],
      +        "type": "object"
      +      },
      +      "result": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "arithmetic": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "computed_invoice_total": {
      +                "anyOf": [
      +                  {
      +                    "maxLength": 42,
      +                    "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$",
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "invoice_currency_scale": {
      +                "enum": [
      +                  0,
      +                  2
      +                ]
      +              },
      +              "invoice_line_amount_sum": {
      +                "maxLength": 42,
      +                "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$",
      +                "type": "string"
      +              },
      +              "invoice_subtotal": {
      +                "anyOf": [
      +                  {
      +                    "maxLength": 42,
      +                    "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$",
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "invoice_subtotal_status": {
      +                "enum": [
      +                  "consistent",
      +                  "mismatch",
      +                  "unavailable"
      +                ]
      +              },
      +              "invoice_supplied_line_amount_sum": {
      +                "anyOf": [
      +                  {
      +                    "maxLength": 42,
      +                    "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$",
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "invoice_tax": {
      +                "anyOf": [
      +                  {
      +                    "maxLength": 42,
      +                    "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$",
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "invoice_total": {
      +                "anyOf": [
      +                  {
      +                    "maxLength": 42,
      +                    "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$",
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "invoice_total_status": {
      +                "enum": [
      +                  "consistent",
      +                  "mismatch",
      +                  "unavailable"
      +                ]
      +              },
      +              "purchase_order_currency_scale": {
      +                "enum": [
      +                  0,
      +                  2
      +                ]
      +              },
      +              "rounding_mode": {
      +                "const": "ROUND_HALF_UP"
      +              },
      +              "rounding_scope": {
      +                "const": "each_line_then_sum"
      +              }
      +            },
      +            "required": [
      +              "rounding_mode",
      +              "rounding_scope",
      +              "invoice_currency_scale",
      +              "purchase_order_currency_scale",
      +              "invoice_line_amount_sum",
      +              "invoice_supplied_line_amount_sum",
      +              "invoice_subtotal",
      +              "invoice_tax",
      +              "invoice_total",
      +              "computed_invoice_total",
      +              "invoice_subtotal_status",
      +              "invoice_total_status"
      +            ],
      +            "type": "object"
      +          },
      +          "comparison_rows": {
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "allocation_status": {
      +                  "enum": [
      +                    "allocated",
      +                    "not_comparable",
      +                    "unmatched"
      +                  ]
      +                },
      +                "computed_invoice_amount": {
      +                  "maxLength": 42,
      +                  "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$",
      +                  "type": "string"
      +                },
      +                "discrepancy_codes": {
      +                  "items": {
      +                    "enum": [
      +                      "currency_mismatch",
      +                      "supplier_mismatch",
      +                      "purchase_order_reference_mismatch",
      +                      "invoice_line_amount_unavailable",
      +                      "purchase_order_line_amount_unavailable",
      +                      "invoice_line_arithmetic_mismatch",
      +                      "purchase_order_line_arithmetic_mismatch",
      +                      "referenced_purchase_order_line_missing",
      +                      "ambiguous_product_code",
      +                      "unmatchable_invoice_line",
      +                      "unit_mismatch",
      +                      "product_code_mismatch",
      +                      "unit_price_mismatch",
      +                      "quantity_exceeds_purchase_order",
      +                      "invoice_subtotal_unavailable",
      +                      "invoice_tax_unavailable",
      +                      "invoice_total_unavailable",
      +                      "invoice_subtotal_mismatch",
      +                      "invoice_supplied_line_sum_mismatch",
      +                      "invoice_total_mismatch"
      +                    ],
      +                    "type": "string"
      +                  },
      +                  "maxItems": 20,
      +                  "minItems": 0,
      +                  "type": "array",
      +                  "uniqueItems": true
      +                },
      +                "invoice_amount": {
      +                  "anyOf": [
      +                    {
      +                      "maxLength": 42,
      +                      "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$",
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "invoice_currency": {
      +                  "enum": [
      +                    "USD",
      +                    "EUR",
      +                    "GBP",
      +                    "CAD",
      +                    "AUD",
      +                    "MXN",
      +                    "JPY"
      +                  ]
      +                },
      +                "invoice_line_id": {
      +                  "maxLength": 80,
      +                  "minLength": 1,
      +                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +                  "type": "string"
      +                },
      +                "invoice_quantity": {
      +                  "maxLength": 42,
      +                  "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$",
      +                  "type": "string"
      +                },
      +                "invoice_source": {
      +                  "maxLength": 100,
      +                  "minLength": 1,
      +                  "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$",
      +                  "type": "string"
      +                },
      +                "invoice_unit": {
      +                  "maxLength": 32,
      +                  "minLength": 1,
      +                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +                  "type": "string"
      +                },
      +                "invoice_unit_price": {
      +                  "maxLength": 42,
      +                  "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$",
      +                  "type": "string"
      +                },
      +                "line_arithmetic_status": {
      +                  "enum": [
      +                    "consistent",
      +                    "mismatch",
      +                    "unavailable"
      +                  ]
      +                },
      +                "match_method": {
      +                  "enum": [
      +                    "unmatched",
      +                    "explicit_po_line_id",
      +                    "exact_product_code"
      +                  ]
      +                },
      +                "outcome": {
      +                  "enum": [
      +                    "no_discrepancies",
      +                    "review_required"
      +                  ]
      +                },
      +                "purchase_order_currency": {
      +                  "enum": [
      +                    "USD",
      +                    "EUR",
      +                    "GBP",
      +                    "CAD",
      +                    "AUD",
      +                    "MXN",
      +                    "JPY"
      +                  ]
      +                },
      +                "purchase_order_line_id": {
      +                  "anyOf": [
      +                    {
      +                      "maxLength": 80,
      +                      "minLength": 1,
      +                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "purchase_order_quantity": {
      +                  "anyOf": [
      +                    {
      +                      "maxLength": 42,
      +                      "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$",
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "purchase_order_source": {
      +                  "anyOf": [
      +                    {
      +                      "maxLength": 100,
      +                      "minLength": 1,
      +                      "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$",
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "purchase_order_unit": {
      +                  "anyOf": [
      +                    {
      +                      "maxLength": 32,
      +                      "minLength": 1,
      +                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "purchase_order_unit_price": {
      +                  "anyOf": [
      +                    {
      +                      "maxLength": 42,
      +                      "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$",
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "unit_price_difference": {
      +                  "anyOf": [
      +                    {
      +                      "maxLength": 42,
      +                      "pattern": "^-?(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$",
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                }
      +              },
      +              "required": [
      +                "invoice_line_id",
      +                "invoice_source",
      +                "purchase_order_line_id",
      +                "purchase_order_source",
      +                "match_method",
      +                "allocation_status",
      +                "invoice_quantity",
      +                "purchase_order_quantity",
      +                "invoice_unit",
      +                "purchase_order_unit",
      +                "invoice_unit_price",
      +                "purchase_order_unit_price",
      +                "invoice_currency",
      +                "purchase_order_currency",
      +                "unit_price_difference",
      +                "invoice_amount",
      +                "computed_invoice_amount",
      +                "line_arithmetic_status",
      +                "discrepancy_codes",
      +                "outcome"
      +              ],
      +              "type": "object"
      +            },
      +            "maxItems": 100,
      +            "minItems": 1,
      +            "type": "array"
      +          },
      +          "discrepancies": {
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "code": {
      +                  "enum": [
      +                    "currency_mismatch",
      +                    "supplier_mismatch",
      +                    "purchase_order_reference_mismatch",
      +                    "invoice_line_amount_unavailable",
      +                    "purchase_order_line_amount_unavailable",
      +                    "invoice_line_arithmetic_mismatch",
      +                    "purchase_order_line_arithmetic_mismatch",
      +                    "referenced_purchase_order_line_missing",
      +                    "ambiguous_product_code",
      +                    "unmatchable_invoice_line",
      +                    "unit_mismatch",
      +                    "product_code_mismatch",
      +                    "unit_price_mismatch",
      +                    "quantity_exceeds_purchase_order",
      +                    "invoice_subtotal_unavailable",
      +                    "invoice_tax_unavailable",
      +                    "invoice_total_unavailable",
      +                    "invoice_subtotal_mismatch",
      +                    "invoice_supplied_line_sum_mismatch",
      +                    "invoice_total_mismatch"
      +                  ],
      +                  "type": "string"
      +                },
      +                "message": {
      +                  "maxLength": 240,
      +                  "minLength": 1,
      +                  "type": "string"
      +                },
      +                "severity": {
      +                  "enum": [
      +                    "error",
      +                    "warning"
      +                  ]
      +                },
      +                "sources": {
      +                  "items": {
      +                    "maxLength": 100,
      +                    "minLength": 1,
      +                    "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$",
      +                    "type": "string"
      +                  },
      +                  "maxItems": 101,
      +                  "minItems": 1,
      +                  "type": "array"
      +                }
      +              },
      +              "required": [
      +                "code",
      +                "severity",
      +                "message",
      +                "sources"
      +              ],
      +              "type": "object"
      +            },
      +            "maxItems": 1000,
      +            "minItems": 0,
      +            "type": "array"
      +          },
      +          "document_checks": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "currency_matches": {
      +                "type": "boolean"
      +              },
      +              "purchase_order_reference_matches": {
      +                "type": "boolean"
      +              },
      +              "supplier_matches": {
      +                "type": "boolean"
      +              }
      +            },
      +            "required": [
      +              "currency_matches",
      +              "supplier_matches",
      +              "purchase_order_reference_matches"
      +            ],
      +            "type": "object"
      +          },
      +          "policy": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "arithmetic_scope": {
      +                "maxLength": 300,
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "decision_scope": {
      +                "maxLength": 300,
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "delivery_verification_supported": {
      +                "const": false
      +              },
      +              "financial_posting_performed": {
      +                "const": false
      +              },
      +              "financial_posting_supported": {
      +                "const": false
      +              },
      +              "human_review_required": {
      +                "const": true
      +              },
      +              "identity_purpose": {
      +                "const": "deterministic_result_comparison_only"
      +              },
      +              "matching_rule": {
      +                "const": "explicit_po_line_id_else_unique_case_sensitive_product_code"
      +              },
      +              "model_calls": {
      +                "const": 0
      +              },
      +              "payment_approval_supported": {
      +                "const": false
      +              },
      +              "quantity_scope": {
      +                "maxLength": 300,
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "raw_documents_retained": {
      +                "const": false
      +              },
      +              "stateless": {
      +                "const": true
      +              },
      +              "supplier_scope": {
      +                "maxLength": 300,
      +                "minLength": 1,
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "human_review_required",
      +              "stateless",
      +              "raw_documents_retained",
      +              "financial_posting_supported",
      +              "financial_posting_performed",
      +              "payment_approval_supported",
      +              "delivery_verification_supported",
      +              "model_calls",
      +              "identity_purpose",
      +              "matching_rule",
      +              "quantity_scope",
      +              "arithmetic_scope",
      +              "supplier_scope",
      +              "decision_scope"
      +            ],
      +            "type": "object"
      +          },
      +          "purchase_order_line_summary": {
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "allocated_invoice_sources": {
      +                  "items": {
      +                    "maxLength": 100,
      +                    "minLength": 1,
      +                    "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$",
      +                    "type": "string"
      +                  },
      +                  "maxItems": 100,
      +                  "minItems": 0,
      +                  "type": "array"
      +                },
      +                "allocated_quantity": {
      +                  "anyOf": [
      +                    {
      +                      "maxLength": 42,
      +                      "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$",
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "computed_amount": {
      +                  "maxLength": 42,
      +                  "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$",
      +                  "type": "string"
      +                },
      +                "line_arithmetic_status": {
      +                  "enum": [
      +                    "consistent",
      +                    "mismatch",
      +                    "unavailable"
      +                  ]
      +                },
      +                "ordered_quantity": {
      +                  "maxLength": 42,
      +                  "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$",
      +                  "type": "string"
      +                },
      +                "overbilled_quantity": {
      +                  "anyOf": [
      +                    {
      +                      "maxLength": 42,
      +                      "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$",
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "purchase_order_line_id": {
      +                  "maxLength": 80,
      +                  "minLength": 1,
      +                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +                  "type": "string"
      +                },
      +                "purchase_order_source": {
      +                  "maxLength": 100,
      +                  "minLength": 1,
      +                  "pattern": "^/(?:invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$",
      +                  "type": "string"
      +                },
      +                "status": {
      +                  "enum": [
      +                    "not_comparable",
      +                    "not_invoiced",
      +                    "overbilled",
      +                    "fully_invoiced",
      +                    "partially_invoiced"
      +                  ]
      +                },
      +                "supplied_amount": {
      +                  "anyOf": [
      +                    {
      +                      "maxLength": 42,
      +                      "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$",
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "uninvoiced_quantity": {
      +                  "anyOf": [
      +                    {
      +                      "maxLength": 42,
      +                      "pattern": "^(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$",
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "unit": {
      +                  "maxLength": 32,
      +                  "minLength": 1,
      +                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "purchase_order_line_id",
      +                "purchase_order_source",
      +                "allocated_invoice_sources",
      +                "ordered_quantity",
      +                "allocated_quantity",
      +                "uninvoiced_quantity",
      +                "overbilled_quantity",
      +                "unit",
      +                "status",
      +                "supplied_amount",
      +                "computed_amount",
      +                "line_arithmetic_status"
      +              ],
      +              "type": "object"
      +            },
      +            "maxItems": 100,
      +            "minItems": 1,
      +            "type": "array"
      +          },
      +          "summary": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "delivery_verified": {
      +                "const": false
      +              },
      +              "discrepancy_count": {
      +                "maximum": 1000,
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "human_review_required": {
      +                "const": true
      +              },
      +              "invoice_line_count": {
      +                "maximum": 100,
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "matched_invoice_line_count": {
      +                "maximum": 100,
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "outcome": {
      +                "enum": [
      +                  "no_discrepancies",
      +                  "review_required"
      +                ]
      +              },
      +              "payment_approved": {
      +                "const": false
      +              },
      +              "purchase_order_line_count": {
      +                "maximum": 100,
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "unknown_check_count": {
      +                "maximum": 1000,
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "unmatched_invoice_line_count": {
      +                "maximum": 100,
      +                "minimum": 0,
      +                "type": "integer"
      +              }
      +            },
      +            "required": [
      +              "outcome",
      +              "invoice_line_count",
      +              "purchase_order_line_count",
      +              "matched_invoice_line_count",
      +              "unmatched_invoice_line_count",
      +              "discrepancy_count",
      +              "unknown_check_count",
      +              "human_review_required",
      +              "delivery_verified",
      +              "payment_approved"
      +            ],
      +            "type": "object"
      +          }
      +        },
      +        "required": [
      +          "summary",
      +          "document_checks",
      +          "comparison_rows",
      +          "purchase_order_line_summary",
      +          "discrepancies",
      +          "arithmetic",
      +          "policy"
      +        ],
      +        "type": "object"
      +      },
      +      "status": {
      +        "const": "review_required"
      +      }
      +    },
      +    "required": [
      +      "contract_version",
      +      "status",
      +      "result",
      +      "identities"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "contract_version": {
      +        "const": "ardaro.agent-invoice-matching.response.v1"
      +      },
      +      "error": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "maxLength": 100,
      +            "type": "string"
      +          },
      +          "message": {
      +            "maxLength": 300,
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "message"
      +        ],
      +        "type": "object"
      +      },
      +      "status": {
      +        "const": "error"
      +      }
      +    },
      +    "required": [
      +      "contract_version",
      +      "status",
      +      "error"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "$schema": "https://json-schema.org/draft/2020-12/schema",
      +    "additionalProperties": false,
      +    "properties": {
      +      "contract_version": {
      +        "const": "ardaro.agent-receipt-intelligence.response.v1"
      +      },
      +      "error": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "maxLength": 80,
      +            "type": "string"
      +          },
      +          "message": {
      +            "maxLength": 280,
      +            "type": "string"
      +          },
      +          "remediation": {
      +            "maxLength": 280,
      +            "type": "string"
      +          },
      +          "retryable": {
      +            "type": "boolean"
      +          },
      +          "service_code": {
      +            "enum": [
      +              "ARDARO_ARITHMETIC_MISMATCH",
      +              "ARDARO_DOCUMENT_TOO_LARGE",
      +              "ARDARO_DUPLICATE_SUSPECTED",
      +              "ARDARO_EXTRACTION_LOW_CONFIDENCE",
      +              "ARDARO_IDEMPOTENCY_CONFLICT",
      +              "ARDARO_INPUT_UNSUPPORTED",
      +              "ARDARO_PAYMENT_INVALID",
      +              "ARDARO_PAYMENT_RECONCILIATION_REQUIRED",
      +              "ARDARO_PAYMENT_REQUIRED",
      +              "ARDARO_RATE_LIMITED",
      +              "ARDARO_SERVICE_UNAVAILABLE"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "service_code",
      +          "message",
      +          "retryable",
      +          "remediation"
      +        ],
      +        "type": "object"
      +      },
      +      "status": {
      +        "const": "error"
      +      }
      +    },
      +    "required": [
      +      "contract_version",
      +      "status",
      +      "error"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "$schema": "https://json-schema.org/draft/2020-12/schema",
      +    "additionalProperties": false,
      +    "properties": {
      +      "contract_version": {
      +        "const": "ardaro.agent-receipt-intelligence.response.v1"
      +      },
      +      "error": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "maxLength": 80,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "message": {
      +            "const": "Service is not ready."
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "message"
      +        ],
      +        "type": "object"
      +      },
      +      "service": {
      +        "const": "ardaro-receipt-intelligence"
      +      },
      +      "status": {
      +        "const": "not_ready"
      +      }
      +    },
      +    "required": [
      +      "contract_version",
      +      "status",
      +      "service",
      +      "error"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "$schema": "https://json-schema.org/draft/2020-12/schema",
      +    "properties": {
      +      "accepts": {
      +        "items": {
      +          "properties": {
      +            "amount": {
      +              "type": "string"
      +            },
      +            "asset": {
      +              "type": "string"
      +            },
      +            "extra": {
      +              "additionalProperties": true,
      +              "type": "object"
      +            },
      +            "maxTimeoutSeconds": {
      +              "type": "integer"
      +            },
      +            "network": {
      +              "type": "string"
      +            },
      +            "payTo": {
      +              "type": "string"
      +            },
      +            "scheme": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "scheme",
      +            "network",
      +            "asset",
      +            "amount",
      +            "payTo",
      +            "maxTimeoutSeconds"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "error": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "extensions": {
      +        "oneOf": [
      +          {
      +            "additionalProperties": true,
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "resource": {
      +        "oneOf": [
      +          {
      +            "properties": {
      +              "description": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "iconUrl": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "mimeType": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "serviceName": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "tags": {
      +                "oneOf": [
      +                  {
      +                    "items": {
      +                      "type": "string"
      +                    },
      +                    "type": "array"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "url": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "url"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "x402Version": {
      +        "const": 2,
      +        "default": 2,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "accepts"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "$schema": "https://json-schema.org/draft/2020-12/schema",
      +    "additionalProperties": false,
      +    "properties": {
      +      "error": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "error"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "message": {
      +        "type": "string"
      +      },
      +      "status": {
      +        "const": "error"
      +      }
      +    },
      +    "required": [
      +      "status",
      +      "message"
      +    ],
      +    "type": "object"
      +  }
      +]
  4. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, and the description adds valuable behavior: matching only by explicit PO line ID or unique exact product code (never description), no receipt input, paid fee, advisory-only output requiring human review, and no accounting writes. No contradiction with annotations.

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 dense but front-loaded with the decision trigger, then exclusions, fee, prerequisite, and limitations. Every sentence earns its place for selection or invocation; there is no filler.

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?

It covers return semantics (per-line statuses plus remaining quantity), exclusions, prerequisite service check, cost, and advisory nature. Since an output schema exists, the lack of an explicit return format description is not a gap.

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

Parameters4/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 adds meaning by clarifying the two main inputs are one invoice and one purchase order, explicitly excluding receipts, and specifying the only accepted matching keys. It does not discuss contract_version, but that is a const and the detailed schema structure carries the remaining burden.

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 states the exact scope: quantity-allocation questions about how much of a PO has been invoiced, with concrete output statuses (fully_invoiced, partially_invoiced, uninvoiced, overbilled) and remaining quantity. It clearly differentiates itself from reconcile_purchase_documents by naming what it is not for.

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

Usage Guidelines5/5

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

It provides explicit 'USE THIS WHEN' and 'DO NOT USE THIS' conditions, naming the sibling tool reconcile_purchase_documents for receipt-invoice comparisons and general diffs. It also instructs the agent to call get_document_service_status first, which is concrete routing guidance.

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.

Resources