receivables_health_report
Grade the health of a business's accounts receivable from its invoice list. Send a CSV export (QuickBooks, Xero, FreshBooks, Wave, Stripe or any CSV with customer and amount columns; columns are auto-detected) or JSON rows, up to 1000 invoices. Returns an A-F grade and 0-100 score with reasons, aging buckets (current, 1-30, 31-60, 61-90, 90+ days), overdue %, weighted days outstanding, DSO, average days to pay, customer concentration, a collection priority list with the next action per overdue invoice (pointing to payment_reminder_draft and late_fee_calc), and recommendations. Use it for a monthly AR review or before chasing payments. Not accounting or legal advice. Pure calculation: no network request, nothing is sent or stored. Costs $1 USDC per call via x402 (payment goes in _meta["x402/payment"]); invalid input returns an error and is not charged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| csv | No | CSV export (QuickBooks, Xero, FreshBooks, Wave, Stripe or your own). Header row required. Recognized columns: invoice number, customer, amount/total, amount paid, balance/open balance, invoice date, due date, terms, paid date, status. | |
| as_of | No | Report date, default today (UTC) | |
| currency | No | USD | |
| invoices | No | Or JSON rows instead of CSV | |
| default_terms | No | Used when a row has no due date and no terms | Net 30 |
| revenue_window_days | No | Window for DSO: invoiced amount in the last N days |