Skip to main content
Glama

Taokeh MCP server

A/R aging

ar_aging
Read-only

Who owes you money and how overdue it is — accounts-receivable aging across ALL customers, bucketed by age. For the unpaid invoices of ONE named customer, use open_invoices. WHAT A ROW IS: the RECEIVABLE each document created on the accounts-receivable control account, less what has been received against it by asOf — never the document's gross total. UNMATCHED PAYMENTS: a customer payment not yet (fully) applied to invoices — a bank receipt posted to a customer, or money recorded on Sales → Official receipts → Receive payment (into a bank or Cash) beyond what the invoices took, or a payment applied only in part (its row is what is left) — is already inside that customer's bucket figures and total as a NEGATIVE amount (money you hold for them), aged from the date it arrived, and is listed under the row's unmatchedPayments (bankTransactionId, date, amount, bucket, kind). kind says what it is: payment (money in, not yet applied — negative; suggest applying it to invoices rather than treating the invoice balance as unpaid: the owner does it in Banking → Match, which can apply part of it, or on Sales → Official receipts → Receive payment, which lists the customer's credit — a payment received in Cash only there), refund (money paid out to the customer, not yet matched — positive), or booked_outside (the bank line was matched to invoices for MORE than it booked to accounts receivable — e.g. posted to an income account first — so the invoices read settled while the control account still holds that amount; positive; the fix is on the bank line). A payment that IS matched, but to an invoice dated after asOf — a deposit the customer paid before the invoice was raised — is listed here too, kind payment, with paysLater ([{reference, date, amount}]) naming the invoice(s) and the date it pays them: it sits on the customer's account until that date and applies then, so do not suggest matching it. unmatchedPaymentsTotal is their sum, less the paysLater part (that part is paysLaterTotal), and documentTotals the buckets of the documents alone — quote documentTotals for what is OVERDUE, totals for the balance. So a row's total is what the customer owes NET, a row can be negative (they have paid ahead), and a customer can appear with no invoice at all. With them, this report equals the control-account balance to the cent, except for entries that belong to no document or bank line: a manual journal posted straight to the control account, the period-end unrealized FX revaluation (on its own date only — it reverses the next day), and a bank line whose allocations were saved but which is not posted yet. If an owner asks why the two disagree, look for those before doubting either figure. The document universe itself differs on purpose wherever the gross was never collectable: a cash or gateway-paid sale posts no receivable at all and is absent; a marketplace order reads the NET PAYOUT the channel owes (gross less the platform fee it withheld, whether that fee was known at import or only booked later from the settlement); a credit note nets its customer down; and an invoice reversed by a channel return reads nil. So a figure here can legitimately be LOWER than the same invoice's total in search_documents or on its PDF — say which you are quoting rather than treating one as an error. Movement booked after asOf is excluded, so a back-dated aging shows what was owed on that date.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ar_aging"
  }
}

Input Schema

NameRequiredDescriptionDefault
asOfNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only cover read-only/no-open-world safety, yet the description discloses row semantics (receivable less receipts, not gross totals), sign conventions (unmatched payments as NEGATIVE, refunds/paysLater as positive), reconciliation guarantees against the control account, and the three named exception classes (manual journals, period-end FX revaluation, unposted bank allocations). It also pre-empts a likely false-alarm: figures can be legitimately lower than search_documents or the PDF, with the reasons enumerated.

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

Conciseness3/5

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

The purpose is front-loaded, but the body is a single dense wall of run-on sentences stuffed with parentheticals, arrow-chains and nested clauses about `kind` values and banking UI paths. Most content is substantive, yet the volume and lack of structural breaks (headers, bullets) make it hard to scan for a one-parameter read tool.

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?

With no output schema, the description takes full responsibility for the return shape and delivers: what a row is, `total` vs `totals` vs `documentTotals`, the `unmatchedPayments` fields (`bankTransactionId`, `date`, `amount`, `bucket`, `kind`), `paysLater`, `unmatchedPaymentsTotal`, and `paysLaterTotal`. An agent can interpret the response without guessing.

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 0% (only a pattern, no description), so the description carries the burden and does: `asOf` defines the cut-off for receipts applied, for matched-to-later-invoice payments, and excludes movements booked after it, enabling back-dated aging. The one gap is that it never says what happens when `asOf` is omitted, despite the parameter being optional.

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 first sentence states a specific resource (accounts-receivable aging) plus scope ('across ALL customers, bucketed by age'), and the second names the sibling it is not: open_invoices, for one named customer. An agent can separate this from ap_aging and open_invoices without opening any 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?

Explicit alternative routing ('For the unpaid invoices of ONE named customer, use open_invoices') plus operational guidance on which figure to quote ('quote `documentTotals` for what is OVERDUE, `totals` for the balance') and how to handle owner disputes. It never states an explicit trigger phrase for calling this tool, but the business question it answers is unambiguous.

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