Skip to main content
Glama

List missing invoices

well_list_missing_invoices
Read-only

List 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

TableJSON Schema
NameRequiredDescriptionDefault
periodsNoSeveral calendar months in one call, 1-12. Each month costs one separate read, so name only the months you need. Duplicates are refused.
fiscal_yearNoFiscal year (the calendar year the workspace's fiscal year STARTED in).
workspace_idNoTarget 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_yearNoCalendar year, e.g. 2026.
fiscal_periodNoFiscal period, 1-12. The adjustment period (13) is refused: it has no calendar month.
calendar_monthNoCalendar month, 1 = January … 12 = December.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsYesThe 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.
errorNo
hintsNo
monthsNoPer-month totals, oldest first.
successYes
row_countNoRows in `rows`, which is the DISTINCT counterparties the call found. Never the sum of the months' own `row_count`.
fiscal_yearNoPresent only when the call named exactly one month.
group_countNoGroups the reads returned before the card's projection.
period_labelNoHuman-readable label of the period, e.g. "June 2026". Present only when the call named one month.
workspace_idNo
base_currencyNo
calendar_yearNoPresent only when the call named exactly one month.
fiscal_periodNoPresent only when the call named exactly one month.
calendar_monthNoPresent only when the call named exactly one month.
dropped_groupsNo
periods_coveredNoThe months the result covers, oldest first.
periods_requestedNoHow many calendar months the call named.
transaction_countNoEvery transaction missing its invoice, across all groups and all months.
resolved_workspaceNoThe workspace that answered, when the caller named none and the token authorizes several.

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses that the tool changes no data, does not mint tasks, does not start a close, does not connect anything, and does not fetch invoices. It also explains subtle behaviors such as one row per counterparty regardless of month count, row_count counting distinct counterparties, the transactions cap, and refusal of current/future/adjustment periods—far more than annotations alone provide.

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

Conciseness4/5

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

The description is long, but the tool is genuinely complex and every major section earns its place: purpose, period selection, cost, result semantics, modes, categorization caveats, and side-effect guarantees. It is front-loaded with the purpose and would be a 5 but for some repeated warnings about one row per counterparty that, while useful, are stated more than once.

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?

For a read-only list tool with six optional parameters and a rich output schema, the description covers all decision-relevant context: how to select periods, what rows represent, what each mode means, which caveats to surface to users, what counts as a complete result, and how workspace resolution works. Nothing material an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already documents every parameter, but the description adds critical meaning the schema cannot express: the three mutually exclusive period-naming forms, the requirement that months must have ended, rejection of duplicate months and period 13, the per-month cost model, and how workspace_id resolves when omitted. This goes well above the baseline for a fully covered schema.

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 verb and resource: 'List the supplier invoices a past period is still missing' with an explicit definition of what counts as missing. It also nails the cardinality ('one row per counterparty') and references a recognizable UI card, so an agent can distinguish this from generic list tools without opening the 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?

The description gives a clear use case ('which invoices am I missing for <month>?'), explains how to name periods, when to omit a period, refusal conditions, and even cost-aware guidance to request only the months the user named. It stops short of explicitly naming alternative tools to use instead, but it is exceptionally clear on when and how to invoke it.

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.

TDQS

A4.5/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: CRUD for companies, people, and invoices; financial analytics (cash, cost, runway, holdings); connector management and invocation; schema discovery; querying; reconciliation; and contact channel management. No two tools could be confused for the same action.

Naming Consistency5/5

All tools follow the `well_verb_noun` pattern with consistent verb choices (create, get, list, update, delete, add, remove, run, resolve, query, invoke). The naming is predictable and makes the tool's purpose immediately clear.

Tool Count4/5

With 26 tools, the set is slightly above the ideal 3-15 range, but every tool earns its place given the breadth of the domain (CRM, invoicing, financial analytics, reconciliation, connector management). The count is well-scoped and not excessive.

Completeness4/5

The tool surface covers core CRUD, financial KPIs, reconciliation, and connector management. Minor gaps exist (e.g., no direct tool to update contact channels or manage accounts), but the query and schema tools allow agents to work around them, and the primary workflows are fully supported.

Resources