List unmatched invoices per period
well_list_period_unmatched_invoicesCount the invoices marked paid that have no confirmed bank payment, per fiscal period. This is the bank-to-books matching gap of a month. It draws no card and needs no close run.
Read one period with fiscal_year and fiscal_period (take them from a well_list_periods entry, or from the month the user already chose; never derive them from a calendar month yourself). Or read the most recent calendar months with months (the running month is included, so 12 complete months need 13).
Each period returns month (YYYY-MM), period_state (closed or open in Well), period_ended (false for the running month), unmatched_count, and sample_invoice_ids (at most 5 ids). unmatched_count is the full count; the sample is only a part of it when the count is above 5. To show the invoices (date, counterparty, amount), read those ids with well_query_records or well_show_records.
The paired write is well_retry_period_matching: it asks the matcher to look again at the period's unmatched invoices, up to 20 from a bounded query, not the sample ids.
success: false means the periods are UNKNOWN, not matched. The read failed, so no count exists. Never say the bank and the books match on a failed read.
When the token authorizes one workspace, call this directly — no workspace call is needed first. When it authorizes several, this read will not guess which one you mean: pass workspace_id on the call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| months | No | Read the N most recent calendar months instead of one period, the running month included (max 13, so 12 complete months need 13). Do not send it with fiscal_year or fiscal_period. | |
| fiscal_year | No | The fiscal year of the one period to read. | |
| workspace_id | No | Target workspace. Omit when the token authorizes one workspace. Required when it authorizes several: this read reports one workspace's own figures and will not choose which. | |
| fiscal_period | No | The fiscal period (month 1-12) of the one period to read. Send it with fiscal_year. | |
| conversation_id | No | The conversation id returned by the previous Well result, in its meta under well/conversation_id, in its structuredContent, or in its JSON text block. Pass it back on every call in the same conversation, including a call a card makes, so the chosen workspace and the earlier answers still apply. It decides the conversation on its own: nothing the host states about the session replaces it. Omit it only on the first call of a conversation. | |
| workspace_scope | No | Restrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| periods | Yes | ||
| success | Yes | ||
| conversation_id | No | The conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation. | |
| newly_connected | No | Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: "<name> is connected.". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later. | |
| resolved_workspace | No | The workspace that answered, when the caller named none and the token authorizes several. | |
| conversation_id_note | No | Present only when the server opened a fresh lane, stating that no choice recorded earlier was read. | |
| conversation_id_source | No | Where the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened. |