Skip to main content
Glama

Check invoice and receipt allocations

check_receipt_allocation
Read-onlyIdempotent

Checks how bank receipts are allocated to export invoices: arithmetic, duplicate allocations, missing row references, overallocated receipts and invoice balances. Takes anonymous row numbers and integer INR paise only; names, GSTINs and certificate numbers are not needed. Up to 200 invoices, 200 receipts and 1000 allocations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoicesYes
receiptsYes
allocationsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitNo
issuesYes
sourcesNo
summaryNo
currencyNo
nextStepNo
arithmeticValidYes
invoiceBalancesYes
receiptBalancesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • removedOutput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / additionalProperties
      Previous value: -{}New value: +true
    • addedOutput schema / properties
      Added value: +{
      +  "arithmeticValid": {
      +    "type": "boolean"
      +  },
      +  "currency": {
      +    "type": "string"
      +  },
      +  "invoiceBalances": {
      +    "items": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "allocatedPaise": {
      +          "type": "number"
      +        },
      +        "amountPaise": {
      +          "type": "number"
      +        },
      +        "balancePaise": {
      +          "type": "number"
      +        },
      +        "row": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "row",
      +        "amountPaise",
      +        "allocatedPaise",
      +        "balancePaise"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "issues": {
      +    "items": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "code": {
      +          "type": "string"
      +        },
      +        "message": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "code"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "nextStep": {
      +    "type": "string"
      +  },
      +  "receiptBalances": {
      +    "items": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "allocatedPaise": {
      +          "type": "number"
      +        },
      +        "amountPaise": {
      +          "type": "number"
      +        },
      +        "balancePaise": {
      +          "type": "number"
      +        },
      +        "row": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "row",
      +        "amountPaise",
      +        "allocatedPaise",
      +        "balancePaise"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "sources": {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  "summary": {
      +    "additionalProperties": true,
      +    "properties": {
      +      "allocatedPaise": {
      +        "type": "number"
      +      },
      +      "invoicePaise": {
      +        "type": "number"
      +      },
      +      "invoicesWithBalance": {
      +        "type": "number"
      +      },
      +      "receiptPaise": {
      +        "type": "number"
      +      },
      +      "receiptsWithBalance": {
      +        "type": "number"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "unit": {
      +    "type": "string"
      +  }
      +}
    • removedOutput schema / propertyNames
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / required
      Added value: +[
      +  "arithmeticValid",
      +  "invoiceBalances",
      +  "receiptBalances",
      +  "issues"
      +]
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, so the safety profile is covered. The description adds real value beyond that: the input constraints (anonymous row numbers, integer INR paise, no names/GSTINs/certificates) and hard caps (200 invoices, 200 receipts, 1000 allocations), which tell the agent how to prepare input and what limits exist.

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?

Two dense sentences, both front-loaded: the first lists what is checked, the second lists input form and limits. Every clause conveys distinct, necessary information with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained. The description covers what is checked, input requirements (anonymous rows, paise) and size limits, which is sufficient for a three-array validation tool. Only the explicit linkage rule (invoiceRow/receiptRow must reference valid row indices) is left implicit.

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 carry the semantics, and it does useful work: it specifies amounts are integer INR paise and that rows are anonymous reference numbers. This clarifies the unit and cross-referencing meaning behind row/invoiceRow/receiptRow/amountPaise that the bare schema does not, though it does not map each array field individually.

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?

States a specific verb (Checks) and resource (how bank receipts are allocated to export invoices), then enumerates the exact conditions checked: arithmetic, duplicate allocations, missing row references, overallocated receipts, invoice balances. This clearly separates it from the sibling validate_* and get_*_requirements tools, which operate on annexures/statements/refunds rather than receipt-invoice allocation.

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

Usage Guidelines3/5

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

The description implies usage (you have invoice, receipt and allocation rows to reconcile) and gives a precondition — that anonymous row numbers and integer INR paise suffice, names/GSTINs/certificate numbers are not needed. However, it never states when to use this versus a sibling tool or any exclusion, leaving the routing to inference.

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.