List missing invoices
well_list_missing_invoicesList the supplier invoices a past period is still missing — the settled spend whose invoice has not been collected, one row per counterparty, exactly as the Well app's expense-invoices card shows them. Use it for "which invoices am I missing for ?" and as the input to fetching them.
Name the period ONE way: { calendar_year, calendar_month } (the calendar month, e.g. June 2026 → 2026, 6), { fiscal_year, fiscal_period }, or periods: [{ calendar_year, calendar_month }, …] for SEVERAL months in one call (1-12) — or name NO period at all to use the months the user selected on the period card this session (well_list_periods → the user clicks → well_switch_workspace records them). With no period named and no months selected, the call refuses and tells you to run the period step first. Every month must have ended — a current or future month is refused, and so is the adjustment period (13). Duplicate months are refused.
COST: there is no batch endpoint, so each named month is a separate read of that month's spend. Ask for the months the user actually named, not a whole year "to be safe".
Returns rows, ONE per counterparty for the whole call, never one per month. Each row carries name, tx_count and base_total_amount in base_currency SUMMED over the months it covers, its own months array naming those months (each with that month's tx_count, base_total_amount, proof_task_id, acquisition_status and refusal_reason), and the route fields mode, available_modes, suggested_action, matched_provider_name and matched_connector_service_id, which the provider match resolves once per counterparty. NEVER list a counterparty once per month and never present its months as separate gaps: it is one supplier to chase, and one collection covers every month behind it. Name the months a row spans from its months array. The envelope's own months carries each month's totals (rows are NOT repeated there), periods_covered names the months read, and transaction_count, group_count and dropped_groups are totals across every month read. row_count counts the DISTINCT counterparties, so it is never the sum of the months' own row_count. dropped_groups counts the GROUPS that produced no row — party-less bank operations, unresolved counterparties, unnamed companies — never transactions, and bank_internal and unknown hold one group per month whatever they contain, so quote neither as a quantity of operations. unknown and unnamed_company ARE categorized expense spend still missing a supplier invoice, so an empty rows over a non-zero count is not a complete period; bank_internal alone is, since no supplier can invoice a party-less operation. The single-month fields calendar_year, calendar_month, fiscal_year, fiscal_period and period_label appear ONLY when the call named exactly one month.
Every row also carries transactions — the counterparty's own lines behind the row, each with date, description (the bank's remittance text), category, amount, currency and base_amount. amount is signed and stays in the transaction's own currency, so never add those together across a row; base_amount is the same line in base_currency, and the magnitudes of those DO add up to base_total_amount. The list is capped at 25 per row and transactions_omitted says how many the cap left out — quote that number instead of implying the list is complete.
mode is the ONE route the card suggests for that row: agent (a browser agent can collect it from the supplier portal), connect (connect the named service and Well fetches it), upload (the user supplies the file). available_modes lists every route the row offers instead of only the suggested one — agent and upload on every row, plus connect when the catalog holds a connector for the matched provider, so 2 or 3 entries. Present mode as the suggestion and available_modes as the choice.
Only CATEGORIZED expense transactions are considered — uncategorized spend is not listed, so poor categorization coverage under-reports the gaps; disclose the hints.
This tool reads the user's data and changes none of it. It does not mint tasks, start a close, connect anything, or fetch any invoice.
Call this directly — no other tool call is needed first (workspace is resolved from the caller's authorized token, same as every other well_* tool).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| periods | No | Several calendar months in one call, 1-12. Each month costs one separate read, so name only the months you need. Duplicates are refused. | |
| fiscal_year | No | Fiscal year (the calendar year the workspace's fiscal year STARTED in). | |
| workspace_id | No | Target workspace. This read reports one workspace's own data. Omit it and the token's primary workspace answers, which may not be the one you mean; the result names the workspace that did. | |
| calendar_year | No | Calendar year, e.g. 2026. | |
| fiscal_period | No | Fiscal period, 1-12. The adjustment period (13) is refused: it has no calendar month. | |
| calendar_month | No | Calendar month, 1 = January … 12 = December. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | The card's rows, ONE per counterparty for the whole call, in the order the oldest month listed them, each naming the months it covers in `months`. A counterparty owing an invoice in several of the months read is one row, never one per month. | |
| error | No | ||
| hints | No | ||
| months | No | Per-month totals, oldest first. | |
| success | Yes | ||
| row_count | No | Rows in `rows`, which is the DISTINCT counterparties the call found. Never the sum of the months' own `row_count`. | |
| fiscal_year | No | Present only when the call named exactly one month. | |
| group_count | No | Groups the reads returned before the card's projection. | |
| period_label | No | Human-readable label of the period, e.g. "June 2026". Present only when the call named one month. | |
| workspace_id | No | ||
| base_currency | No | ||
| calendar_year | No | Present only when the call named exactly one month. | |
| fiscal_period | No | Present only when the call named exactly one month. | |
| calendar_month | No | Present only when the call named exactly one month. | |
| dropped_groups | No | ||
| periods_covered | No | The months the result covers, oldest first. | |
| periods_requested | No | How many calendar months the call named. | |
| transaction_count | No | Every transaction missing its invoice, across all groups and all months. | |
| resolved_workspace | No | The workspace that answered, when the caller named none and the token authorizes several. |