Skip to main content
Glama

mechacut

ledger_apply_payments

FIFO reconciliation: payments onto invoices, oldest due first, ties keep input order; payments apply in the order given — the engine never reorders your cash. Cent-level exact Decimal, sub-cent inputs refused with a pointer, over-application leaves a named leftover instead of smearing onto the newest invoice. Refunds are credit notes, not negative payments. Free.

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": {
      "invoices": "<invoices>",
      "payments": "<payments>"
    },
    "name": "ledger_apply_payments"
  }
}

Input Schema

NameRequiredDescriptionDefault
invoicesYes
paymentsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses FIFO ordering, tie-breaking by input order, exact Decimal cent behavior, refusal of sub-cent inputs, over-application leftovers, and the refund-as-credit-note rule. It stops short of describing persistence/write semantics, authorization, idempotency, or what the operation returns.

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 dense and front-loaded with the core FIFO behavior, and each sentence about ordering, Decimal handling, leftovers, and refunds carries operational meaning. The trailing 'Free.' is minor but slightly extraneous.

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

Completeness3/5

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

For a financial reconciliation tool with no annotations, no output schema, and zero schema field descriptions, the definition explains algorithm and error behavior well but leaves input field meanings, write/persistence semantics, and return values undocumented. It is adequate but incomplete for the tool's complexity.

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

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds meaningful semantics for ordering (oldest due first, payments in given order), amount precision (cent-level Decimal, sub-cent refused), and over-application leftovers, but it does not explain the meaning of fields like id, due, paid, date, or the required formats.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: FIFO reconciliation that applies payments onto invoices. It clearly distinguishes the operation from a summary or generic ledger tool by describing the matching algorithm, though it never names a sibling or explicitly says how it differs from ledger_summary.

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?

Usage is implied through operational rules: payments apply in input order, FIFO applies oldest due first, refunds must be credit notes rather than negative payments. However, there is no explicit when-to-use guidance, no named alternative, and no statement of prerequisites or when not to call the tool.

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.