Skip to main content
Glama

Ardaro Purchase Document Review

Compare receipt, invoice and PO for discrepancies (free)

reconcile_purchase_documents
Read-onlyIdempotent

USE THIS WHEN you have up to three documents (receipt, invoice, purchase order - any subset) and need a discrepancy list: reference, item, quantity, price, or arithmetic mismatches between them. This is the default choice for 'does this receipt match the invoice' or 'do these documents agree' questions. Links use explicit line references, exact product codes, or conservative normalized descriptions. DO NOT USE THIS if the actual question is a quantity-allocation question - how much of a PO has been invoiced, or resolving partial/split invoice lines against PO quantities. This tool does not allocate billed quantities or calculate remaining PO quantities: partial quantities are reported as plain differences, and any many-to-one (split) link is flagged ambiguous_many_to_one rather than resolved. For that, call match_invoice instead (paid, 0.50 USDC) - but you never need to call it before or after this tool; each works standalone. Free, no wallet authorization, no payment metadata accepted. Missing documents or fields are marked needs_review, never inferred. No OCR, retrieval, saved analyses, paid service calls, delivery verification, payment approval, or accounting writes. Human review required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoiceNoCaller-supplied structured data. Use opaque supplier IDs and decimal strings; omit unknown fields. Receipt kind describes the source document, not verified delivery. Field names align with invoice matching; receipt extraction output must be mapped explicitly.
receiptNoCaller-supplied structured data. Use opaque supplier IDs and decimal strings; omit unknown fields. Receipt kind describes the source document, not verified delivery. Field names align with invoice matching; receipt extraction output must be mapped explicitly.
purchase_orderNoCaller-supplied structured data. Use opaque supplier IDs and decimal strings; omit unknown fields. Receipt kind describes the source document, not verified delivery. Field names align with invoice matching; receipt extraction output must be mapped explicitly.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed45 schema fields changed
    • changedInput schema / properties / invoice / properties / currency / pattern
      Previous value: -"^[A-Z]{3}(?![\\s\\S])"New value: +"^[A-Z]{3}$"
    • changedInput schema / properties / invoice / properties / line_items / items / properties / amount / pattern
      Previous value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$"
    • changedInput schema / properties / invoice / properties / line_items / items / properties / line_id / pattern
      Previous value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
    • changedInput schema / properties / invoice / properties / line_items / items / properties / po_line_id / pattern
      Previous value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
    • changedInput schema / properties / invoice / properties / line_items / items / properties / product_code / pattern
      Previous value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
    • addedInput schema / properties / invoice / properties / line_items / items / properties / quantity / allOf
      Added value: +[
      +  {
      +    "not": {
      +      "pattern": "^0(?:\\.0+)?$"
      +    }
      +  }
      +]
    • changedInput schema / properties / invoice / properties / line_items / items / properties / quantity / not / pattern
      Previous value: -"^0(?:\\.0+)?(?![\\s\\S])"New value: +"\\n"
    • changedInput schema / properties / invoice / properties / line_items / items / properties / quantity / pattern
      Previous value: -"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$"
    • changedInput schema / properties / invoice / properties / line_items / items / properties / unit / pattern
      Previous value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
    • addedInput schema / properties / invoice / properties / line_items / items / properties / unit_price / not
      Added value: +{
      +  "pattern": "\\n"
      +}
    • changedInput schema / properties / invoice / properties / line_items / items / properties / unit_price / pattern
      Previous value: -"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$"
    • changedInput schema / properties / invoice / properties / subtotal / pattern
      Previous value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$"
    • changedInput schema / properties / invoice / properties / supplier_id / pattern
      Previous value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
    • changedInput schema / properties / invoice / properties / tax / pattern
      Previous value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$"
    • changedInput schema / properties / invoice / properties / total / pattern
      Previous value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$"
    • changedInput schema / properties / purchase_order / properties / currency / pattern
      Previous value: -"^[A-Z]{3}(?![\\s\\S])"New value: +"^[A-Z]{3}$"
    • changedInput schema / properties / purchase_order / properties / line_items / items / properties / amount / pattern
      Previous value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$"
    • changedInput schema / properties / purchase_order / properties / line_items / items / properties / line_id / pattern
      Previous value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
    • changedInput schema / properties / purchase_order / properties / line_items / items / properties / product_code / pattern
      Previous value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
    • addedInput schema / properties / purchase_order / properties / line_items / items / properties / quantity / allOf
      Added value: +[
      +  {
      +    "not": {
      +      "pattern": "^0(?:\\.0+)?$"
      +    }
      +  }
      +]
    • changedInput schema / properties / purchase_order / properties / line_items / items / properties / quantity / not / pattern
      Previous value: -"^0(?:\\.0+)?(?![\\s\\S])"New value: +"\\n"
    • changedInput schema / properties / purchase_order / properties / line_items / items / properties / quantity / pattern
      Previous value: -"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$"
    • changedInput schema / properties / purchase_order / properties / line_items / items / properties / unit / pattern
      Previous value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
    • addedInput schema / properties / purchase_order / properties / line_items / items / properties / unit_price / not
      Added value: +{
      +  "pattern": "\\n"
      +}
    • changedInput schema / properties / purchase_order / properties / line_items / items / properties / unit_price / pattern
      Previous value: -"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$"
    • changedInput schema / properties / purchase_order / properties / subtotal / pattern
      Previous value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$"
    • changedInput schema / properties / purchase_order / properties / supplier_id / pattern
      Previous value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
    • changedInput schema / properties / purchase_order / properties / tax / pattern
      Previous value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$"
    • changedInput schema / properties / purchase_order / properties / total / pattern
      Previous value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$"
    • changedInput schema / properties / receipt / properties / currency / pattern
      Previous value: -"^[A-Z]{3}(?![\\s\\S])"New value: +"^[A-Z]{3}$"
    • changedInput schema / properties / receipt / properties / line_items / items / properties / amount / pattern
      Previous value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$"
    • changedInput schema / properties / receipt / properties / line_items / items / properties / invoice_line_id / pattern
      Previous value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
    • changedInput schema / properties / receipt / properties / line_items / items / properties / line_id / pattern
      Previous value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
    • changedInput schema / properties / receipt / properties / line_items / items / properties / product_code / pattern
      Previous value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
    • addedInput schema / properties / receipt / properties / line_items / items / properties / quantity / allOf
      Added value: +[
      +  {
      +    "not": {
      +      "pattern": "^0(?:\\.0+)?$"
      +    }
      +  }
      +]
    • changedInput schema / properties / receipt / properties / line_items / items / properties / quantity / not / pattern
      Previous value: -"^0(?:\\.0+)?(?![\\s\\S])"New value: +"\\n"
    • changedInput schema / properties / receipt / properties / line_items / items / properties / quantity / pattern
      Previous value: -"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$"
    • changedInput schema / properties / receipt / properties / line_items / items / properties / unit / pattern
      Previous value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
    • addedInput schema / properties / receipt / properties / line_items / items / properties / unit_price / not
      Added value: +{
      +  "pattern": "\\n"
      +}
    • changedInput schema / properties / receipt / properties / line_items / items / properties / unit_price / pattern
      Previous value: -"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$"
    • changedInput schema / properties / receipt / properties / subtotal / pattern
      Previous value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$"
    • changedInput schema / properties / receipt / properties / supplier_id / pattern
      Previous value: -"^[A-Za-z0-9][A-Za-z0-9._:/-]*(?![\\s\\S])"New value: +"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
    • changedInput schema / properties / receipt / properties / tax / pattern
      Previous value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$"
    • changedInput schema / properties / receipt / properties / total / pattern
      Previous value: -"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?(?![\\s\\S])"New value: +"^(?:0|[1-9][0-9]{0,25})(?:\\.[0-9]{1,6})?$"
    • changedOutput schema / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "comparisons": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "document_identity_comparable": {
      -              "type": "boolean"
      -            },
      -            "pair": {
      -              "enum": [
      -                "receipt_to_invoice",
      -                "invoice_to_purchase_order"
      -              ]
      -            },
      -            "rows": {
      -              "items": {
      -                "additionalProperties": false,
      -                "properties": {
      -                  "amount_difference": {
      -                    "maxLength": 50,
      -                    "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])",
      -                    "type": [
      -                      "string",
      -                      "null"
      -                    ]
      -                  },
      -                  "candidate_targets": {
      -                    "items": {
      -                      "maxLength": 100,
      -                      "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])",
      -                      "type": "string"
      -                    },
      -                    "maxItems": 100,
      -                    "type": "array"
      -                  },
      -                  "comparison_performed": {
      -                    "type": "boolean"
      -                  },
      -                  "match_method": {
      -                    "enum": [
      -                      "unmatched",
      -                      "explicit_line_reference",
      -                      "exact_product_code",
      -                      "normalized_description"
      -                    ]
      -                  },
      -                  "quantity_difference": {
      -                    "maxLength": 50,
      -                    "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])",
      -                    "type": [
      -                      "string",
      -                      "null"
      -                    ]
      -                  },
      -                  "source": {
      -                    "maxLength": 100,
      -                    "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])",
      -                    "type": "string"
      -                  },
      -                  "status": {
      -                    "enum": [
      -                      "no_discrepancies",
      -                      "needs_review"
      -                    ]
      -                  },
      -                  "target": {
      -                    "anyOf": [
      -                      {
      -                        "maxLength": 100,
      -                        "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])",
      -                        "type": "string"
      -                      },
      -                      {
      -                        "type": "null"
      -                      }
      -                    ]
      -                  },
      -                  "unit_price_difference": {
      -                    "maxLength": 50,
      -                    "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?(?![\\s\\S])",
      -                    "type": [
      -                      "string",
      -                      "null"
      -                    ]
      -                  }
      -                },
      -                "required": [
      -                  "source",
      -                  "target",
      -                  "candidate_targets",
      -                  "match_method",
      -                  "comparison_performed",
      -                  "status",
      -                  "quantity_difference",
      -                  "unit_price_difference",
      -                  "amount_difference"
      -                ],
      -                "type": "object"
      -              },
      -              "maxItems": 100,
      -              "type": "array"
      -            },
      -            "status": {
      -              "enum": [
      -                "no_discrepancies",
      -                "needs_review"
      -              ]
      -            }
      -          },
      -          "required": [
      -            "pair",
      -            "status",
      -            "document_identity_comparable",
      -            "rows"
      -          ],
      -          "type": "object"
      -        },
      -        "maxItems": 2,
      -        "minItems": 2,
      -        "type": "array"
      -      },
      -      "contract_version": {
      -        "const": "ardaro.purchase-document-reconciliation.response.v1"
      -      },
      -      "delivery_verified": {
      -        "const": false
      -      },
      -      "discrepancies": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "code": {
      -              "maxLength": 80,
      -              "pattern": "^[a-z_]+(?![\\s\\S])",
      -              "type": "string"
      -            },
      -            "scope": {
      -              "enum": [
      -                "receipt",
      -                "invoice",
      -                "purchase_order",
      -                "receipt_to_invoice",
      -                "invoice_to_purchase_order"
      -              ]
      -            },
      -            "severity": {
      -              "enum": [
      -                "unknown",
      -                "discrepancy"
      -              ]
      -            },
      -            "sources": {
      -              "items": {
      -                "maxLength": 100,
      -                "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*(?![\\s\\S])",
      -                "type": "string"
      -              },
      -              "maxItems": 101,
      -              "type": "array"
      -            }
      -          },
      -          "required": [
      -            "code",
      -            "scope",
      -            "severity",
      -            "sources"
      -          ],
      -          "type": "object"
      -        },
      -        "maxItems": 6000,
      -        "type": "array"
      -      },
      -      "document_summary": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "currency_minor_units": {
      -              "enum": [
      -                0,
      -                2,
      -                null
      -              ]
      -            },
      -            "currency_supported": {
      -              "type": "boolean"
      -            },
      -            "document": {
      -              "enum": [
      -                "receipt",
      -                "invoice",
      -                "purchase_order"
      -              ]
      -            },
      -            "line_count": {
      -              "maximum": 100,
      -              "minimum": 0,
      -              "type": "integer"
      -            },
      -            "present": {
      -              "type": "boolean"
      -            }
      -          },
      -          "required": [
      -            "document",
      -            "present",
      -            "line_count",
      -            "currency_supported",
      -            "currency_minor_units"
      -          ],
      -          "type": "object"
      -        },
      -        "maxItems": 3,
      -        "minItems": 3,
      -        "type": "array"
      -      },
      -      "financial_posting_performed": {
      -        "const": false
      -      },
      -      "human_review_required": {
      -        "const": true
      -      },
      -      "payment_approved": {
      -        "const": false
      -      },
      -      "policy": {
      -        "const": {
      -          "arithmetic_scope": "Exact decimal comparisons with per-line ROUND_HALF_UP at supported currency precision. No tax applicability, discounts, freight or currency conversion is inferred.",
      -          "decision_scope": "No discrepancies means the supported checks found none in supplied data. It is not payment authorization, accounting approval or supplier verification.",
      -          "document_storage_performed": false,
      -          "matching_rule": "explicit line reference, else unique exact case-sensitive product code, else unique NFKC/casefold/whitespace-normalized description when both product codes are absent; never fuzzy or semantic",
      -          "model_calls": 0,
      -          "paid_tool_calls": 0,
      -          "payment_required": false,
      -          "quantity_scope": "Differences concern only these three supplied documents. Partial receipts, partial invoicing, prior invoices, returns and delivery events are not inferred.",
      -          "receipt_scope": "An expense receipt is not evidence of delivery. A delivery_receipt label is caller-supplied and does not authenticate delivery.",
      -          "retention_scope": "This function retains no documents or results; caller and transport retention are outside this function's guarantees."
      -        }
      -      },
      -      "provenance": {
      -        "const": {
      -          "document_authenticity_verified": false,
      -          "external_data_fetched": false,
      -          "source": "caller_supplied_documents_only",
      -          "source_pointer_root": "original_arguments"
      -        }
      -      },
      -      "result_identity": {
      -        "pattern": "^res_[0-9a-f]{64}(?![\\s\\S])",
      -        "type": "string"
      -      },
      -      "status": {
      -        "enum": [
      -          "no_discrepancies",
      -          "needs_review"
      -        ]
      -      }
      -    },
      -    "required": [
      -      "contract_version",
      -      "human_review_required",
      -      "payment_approved",
      -      "delivery_verified",
      -      "financial_posting_performed",
      -      "provenance",
      -      "policy",
      -      "status",
      -      "result_identity",
      -      "document_summary",
      -      "comparisons",
      -      "discrepancies"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "contract_version": {
      -        "const": "ardaro.purchase-document-reconciliation.response.v1"
      -      },
      -      "error": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "code": {
      -            "maxLength": 80,
      -            "type": "string"
      -          },
      -          "message": {
      -            "maxLength": 300,
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "code",
      -          "message"
      -        ],
      -        "type": "object"
      -      },
      -      "status": {
      -        "const": "error"
      -      }
      -    },
      -    "required": [
      -      "contract_version",
      -      "status",
      -      "error"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "comparisons": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "document_identity_comparable": {
      +              "type": "boolean"
      +            },
      +            "pair": {
      +              "enum": [
      +                "receipt_to_invoice",
      +                "invoice_to_purchase_order"
      +              ]
      +            },
      +            "rows": {
      +              "items": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "amount_difference": {
      +                    "maxLength": 50,
      +                    "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$",
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  },
      +                  "candidate_targets": {
      +                    "items": {
      +                      "maxLength": 100,
      +                      "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$",
      +                      "type": "string"
      +                    },
      +                    "maxItems": 100,
      +                    "type": "array"
      +                  },
      +                  "comparison_performed": {
      +                    "type": "boolean"
      +                  },
      +                  "match_method": {
      +                    "enum": [
      +                      "unmatched",
      +                      "explicit_line_reference",
      +                      "exact_product_code",
      +                      "normalized_description"
      +                    ]
      +                  },
      +                  "quantity_difference": {
      +                    "maxLength": 50,
      +                    "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$",
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  },
      +                  "source": {
      +                    "maxLength": 100,
      +                    "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$",
      +                    "type": "string"
      +                  },
      +                  "status": {
      +                    "enum": [
      +                      "no_discrepancies",
      +                      "needs_review"
      +                    ]
      +                  },
      +                  "target": {
      +                    "anyOf": [
      +                      {
      +                        "maxLength": 100,
      +                        "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$",
      +                        "type": "string"
      +                      },
      +                      {
      +                        "type": "null"
      +                      }
      +                    ]
      +                  },
      +                  "unit_price_difference": {
      +                    "maxLength": 50,
      +                    "pattern": "^-?(?:0|[1-9][0-9]{0,27})(?:\\.[0-9]{1,12})?$",
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  }
      +                },
      +                "required": [
      +                  "source",
      +                  "target",
      +                  "candidate_targets",
      +                  "match_method",
      +                  "comparison_performed",
      +                  "status",
      +                  "quantity_difference",
      +                  "unit_price_difference",
      +                  "amount_difference"
      +                ],
      +                "type": "object"
      +              },
      +              "maxItems": 100,
      +              "type": "array"
      +            },
      +            "status": {
      +              "enum": [
      +                "no_discrepancies",
      +                "needs_review"
      +              ]
      +            }
      +          },
      +          "required": [
      +            "pair",
      +            "status",
      +            "document_identity_comparable",
      +            "rows"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 2,
      +        "minItems": 2,
      +        "type": "array"
      +      },
      +      "contract_version": {
      +        "const": "ardaro.purchase-document-reconciliation.response.v1"
      +      },
      +      "delivery_verified": {
      +        "const": false
      +      },
      +      "discrepancies": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "code": {
      +              "maxLength": 80,
      +              "pattern": "^[a-z_]+$",
      +              "type": "string"
      +            },
      +            "scope": {
      +              "enum": [
      +                "receipt",
      +                "invoice",
      +                "purchase_order",
      +                "receipt_to_invoice",
      +                "invoice_to_purchase_order"
      +              ]
      +            },
      +            "severity": {
      +              "enum": [
      +                "unknown",
      +                "discrepancy"
      +              ]
      +            },
      +            "sources": {
      +              "items": {
      +                "maxLength": 100,
      +                "pattern": "^/(?:receipt|invoice|purchase_order)(?:/[A-Za-z0-9_]+)*$",
      +                "type": "string"
      +              },
      +              "maxItems": 101,
      +              "type": "array"
      +            }
      +          },
      +          "required": [
      +            "code",
      +            "scope",
      +            "severity",
      +            "sources"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 6000,
      +        "type": "array"
      +      },
      +      "document_summary": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "currency_minor_units": {
      +              "enum": [
      +                0,
      +                2,
      +                null
      +              ]
      +            },
      +            "currency_supported": {
      +              "type": "boolean"
      +            },
      +            "document": {
      +              "enum": [
      +                "receipt",
      +                "invoice",
      +                "purchase_order"
      +              ]
      +            },
      +            "line_count": {
      +              "maximum": 100,
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "present": {
      +              "type": "boolean"
      +            }
      +          },
      +          "required": [
      +            "document",
      +            "present",
      +            "line_count",
      +            "currency_supported",
      +            "currency_minor_units"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 3,
      +        "minItems": 3,
      +        "type": "array"
      +      },
      +      "financial_posting_performed": {
      +        "const": false
      +      },
      +      "human_review_required": {
      +        "const": true
      +      },
      +      "payment_approved": {
      +        "const": false
      +      },
      +      "policy": {
      +        "const": {
      +          "arithmetic_scope": "Exact decimal comparisons with per-line ROUND_HALF_UP at supported currency precision. No tax applicability, discounts, freight or currency conversion is inferred.",
      +          "decision_scope": "No discrepancies means the supported checks found none in supplied data. It is not payment authorization, accounting approval or supplier verification.",
      +          "document_storage_performed": false,
      +          "matching_rule": "explicit line reference, else unique exact case-sensitive product code, else unique NFKC/casefold/whitespace-normalized description when both product codes are absent; never fuzzy or semantic",
      +          "model_calls": 0,
      +          "paid_tool_calls": 0,
      +          "payment_required": false,
      +          "quantity_scope": "Differences concern only these three supplied documents. Partial receipts, partial invoicing, prior invoices, returns and delivery events are not inferred.",
      +          "receipt_scope": "An expense receipt is not evidence of delivery. A delivery_receipt label is caller-supplied and does not authenticate delivery.",
      +          "retention_scope": "This function retains no documents or results; caller and transport retention are outside this function's guarantees."
      +        }
      +      },
      +      "provenance": {
      +        "const": {
      +          "document_authenticity_verified": false,
      +          "external_data_fetched": false,
      +          "source": "caller_supplied_documents_only",
      +          "source_pointer_root": "original_arguments"
      +        }
      +      },
      +      "result_identity": {
      +        "pattern": "^res_[0-9a-f]{64}$",
      +        "type": "string"
      +      },
      +      "status": {
      +        "enum": [
      +          "no_discrepancies",
      +          "needs_review"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "contract_version",
      +      "human_review_required",
      +      "payment_approved",
      +      "delivery_verified",
      +      "financial_posting_performed",
      +      "provenance",
      +      "policy",
      +      "status",
      +      "result_identity",
      +      "document_summary",
      +      "comparisons",
      +      "discrepancies"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "contract_version": {
      +        "const": "ardaro.purchase-document-reconciliation.response.v1"
      +      },
      +      "error": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "maxLength": 80,
      +            "type": "string"
      +          },
      +          "message": {
      +            "maxLength": 300,
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "message"
      +        ],
      +        "type": "object"
      +      },
      +      "status": {
      +        "const": "error"
      +      }
      +    },
      +    "required": [
      +      "contract_version",
      +      "status",
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
  4. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true and destructiveHint=false, which the description reinforces with 'no accounting writes' and 'no paid service calls'. The description adds behavioral context beyond annotations: missing documents/fields marked needs_review, never inferred; partial quantities reported as plain differences; many-to-one links flagged ambiguous_many_to_one; no OCR, no retrieval, no saved analyses; human review required. The description slightly exceeds necessary transparency, but it's all relevant. No contradiction. The only minor gap is that it doesn't explicitly state it's free in the description body (title says free), but that's in the schema as well. Solid.

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

Conciseness4/5

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

The description is comprehensive but somewhat long. It front-loads the primary use case and key output, then covers exclusions and alternatives. The paragraph is dense but well-structured: usage, limitations, alternatives, and behavioral disclaimers. It could be trimmed slightly (e.g., repeating 'free' in title and 'no OCR' list), but every sentence adds value. Not excessively verbose. Score 4.

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?

For a complex tool with three nested objects, the description completely covers what the tool does, does not do, when to use it, when not to, alternatives, limitations (max lines), data handling, and output behavior (needs_review). The output schema exists, so return values are likely defined. The description also mentions human review required. Given the high complexity, this is a complete description. Nothing essential is missing.

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 100% at the top level, with detailed descriptions for each object (invoice, receipt, purchase_order) stating they are caller-supplied structured data, using opaque supplier IDs, decimal strings, omitting unknown fields, and field name alignment. The description adds overall context beyond schema: that the tool takes up to three documents any subset, and the structure of discrepancies. The schema's nested objects are well-defined. Given the high coverage and detailed schema, the description adds value by clarifying input semantics (e.g., 'receipt kind describes source document, not verified delivery') which is beyond schema. Score 4.

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 a specific verb and resource: reconcile up to three documents (receipt, invoice, purchase order) and output a discrepancy list. It distinguishes itself from sibling match_invoice by explicitly saying it does not allocate quantities or resolve splits. The title also adds 'free' as a differentiator. The purpose is unambiguous and differentiates from siblings.

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?

The description gives explicit when-to-use conditions: when you have up to three documents and need discrepancy lists regarding reference, item, quantity, price, or arithmetic. It gives explicit when-not-to-use: for quantity-allocation questions, partial/split invoice lines. It names the alternative tool (match_invoice) and clarifies it is paid and standalone. This is thorough usage 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