Skip to main content
Glama

Payment Allocation to Invoices

payment_allocation
Read-onlyIdempotent

Apply one customer payment across that customer's open invoices (accounts receivable cash application). Send the payment amount and the open invoices (invoice number, due date, open amount). By default the payment goes to the invoice that fell due first, then the next. Or send the remittance (which invoices the customer said to pay, and how much each, or the application the creditor chose) and it is applied exactly so. Get back what goes to each invoice, what stays open on each, the open total before and after, any unapplied cash, and every remittance line that names an invoice not in the list or pays more than is open. Answer fields: ok, verdict, result, rule, does_not, sources, observation, signature, verify. Errors: ok false with the reason (bad input, too large, hourly limit). Free. No model, no network, nothing you send is stored by the tool, and every answer is signed with LLPRO's key (check it at https://llpro.ai/payment-allocation). Labels are your own text: emails, web addresses and long digit runs are refused. Not legal, tax or financial advice.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "payment_amount": "<payment_amount>",
      "invoices": "<invoices>"
    },
    "name": "payment_allocation"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelNoOptional label for the payment (your own text, echoed back; not a person; up to 6 digits in a row).
methodNooldest_first (default) or remittance (apply as the customer's remittance says).oldest_first
invoicesYesThe customer's open invoices (up to 200).
remittanceNoWith method remittance: the invoices the customer said the payment is for, and the amount for each.
payment_amountYesThe payment received from the customer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, the description discloses that the tool is free, uses no model or network, stores nothing, signs every answer, and returns specific error reasons. It also states label restrictions and the verification URL, adding substantial behavioral context not covered by the readOnly/idempotent/non-destructive annotations.

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 front-loaded with purpose and allocation behavior, then covers outputs, errors, guarantees, and constraints. It is somewhat long but appropriately structured for a tool with multiple modes and no output schema; most sentences carry useful information.

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

Completeness5/5

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

Given the tool's complexity, lack of output schema, and rich annotations, the description is complete: it explains inputs, allocation behavior, return fields, error conditions, storage/network guarantees, and signature verification. An agent has enough information to call and interpret the tool correctly.

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 coverage is 100%, so the baseline is 3, but the description adds meaningful semantics for method and remittance: oldest-first means earliest due date first, while remittance applies exactly as specified. It also clarifies that invoices include invoice number, due date, and open amount, improving understanding beyond the schema.

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: apply one customer payment across that customer's open invoices. It clearly distinguishes the default oldest-first allocation from exact remittance-based application, so an agent can understand the tool's purpose without opening the schema.

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

Usage Guidelines4/5

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

It explains the two usage modes: default oldest-first allocation and remittance-based exact application. It does not explicitly name when not to use the tool or compare it to alternatives, but the method-selection guidance is clear and sufficient for invocation.

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