Aged balances
aged-balancesReceivables or payables aged at a date: who owes the company and how late it is, or whom it owes and when.
WHEN TO USE:
"Who owes us money?", "what's overdue?", "whom do we owe, and when is it due?"
Month-end review: the aging at the month-end date, and each entity's open items tied out to its receivables or payables account
One counterparty's open invoices or bills: pass
agent_id
PARAMETERS:
kind (required):
receivablesorpayablesas_of (optional, YYYY-MM-DD): the date to age at; omit for today. A payment dated after it has not happened yet
entity_id (optional): omit for the group parent
scope (optional, default
entity):groupsums the parent and the members consolidated in full, and sets apart what they owe each otheragent_id (optional): that counterparty's open items instead of the summary
RETURNS: Amounts are in cents.
Without
agent_id:buckets(current, 1–30, 31–60, 61–90 and over 90 days past due, and unapplied credit from overpayments),agents(a row per counterparty, largest first),defaulted_due_date_count(items with no due date of their own, aged as due on receipt), andtie_outs: each entity's open items against its control accounts, withdifference_centsnamed and never plugged;pending_close_centsis what the close will post from documents already counted (a payment committed in an open month), so it is not a difference. For a group,intercompanyholds the items the members owe each other, andpairssets both sides of each pair side by side.With
agent_id:items, oldest first, each with its due date,due_date_basis, days past due and bucket.
RELATED TOOLS:
agent-activity — a counterparty's events and transactions
update-event-block — correct an invoice's or bill's
due_date
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": {
"kind": "<kind>"
},
"name": "aged-balances"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| as_of | No | The date to age at, YYYY-MM-DD. Omit for today. | |
| scope | No | entity | |
| agent_id | No | One counterparty (agt_ prefixed). | |
| entity_id | No | The entity whose books this acts on, by id (get-graph-info lists them). Omit for the group parent. |