Skip to main content
Glama

Sum missing invoices of a week or months

well_sum_missing_invoices
Read-only

The missing supplier invoices of one ISO week, or of up to 3 calendar months, as one total: how many suppliers still miss an invoice, how many transactions they cover, and the spend they cover, in the currency of the lines and converted to the workspace base currency. It returns no rows.

week is an ISO week, YYYY-Www (Monday to Sunday), for example 2026-W40. A week has ended when its Sunday has ended in the workspace time zone. Omit it to read the last week that has ended. A refusal carries error_code: week_invalid for a week its year does not have (a week 53 in a 52-week year), week_not_ended for a week that has not ended yet, no_workspace when no workspace is in context, read_failed when the read of the week failed.

Pass from_month (and to_month, both YYYY-MM) instead of week to sum whole calendar months: from_month alone reads one month, both read every month from the first to the last, at most 3 months. A month has ended when its last day has ended in the workspace time zone. With through_today: true the last month may be the running one, read up to today with is_complete: false. A month that starts after today is refused with month_not_started, and a running month without through_today with month_not_ended. A month read that takes longer than its time budget is refused with read_timed_out: the workspace was not read. A to_month before from_month, or months passed beside week is refused with months_invalid, and more than 3 months with months_too_many. A month read returns from_month and to_month in place of week, and no pending_count.

Pass through_today: true to read the week that is running: with week omitted it reads the current ISO week, and a named week that has started reads from its Monday to today in the workspace time zone. is_complete is false for that open window, so the figures cover the days so far and never compare to a full week. A week that starts after today is still refused with week_not_ended. Without through_today, a week that has not ended is refused.

supplier_count counts the suppliers that still miss an invoice, with the gaps and the row rule of the missing-invoices card; over several months a supplier counts once. transaction_count counts the transactions of those suppliers that still miss an invoice. total is the spend those suppliers cover, converted to currency (the workspace base currency). It is null when a line has no exchange rate for its date, or when the amount of a line held out as a possible duplicate is unknown because the read's sample does not carry it: a partial sum would read as the whole figure. It covers the named suppliers' groups only, so it is not the conversion of a net below, which also holds the groups with no named supplier.

totals_by_currency is the money of the week still missing an invoice, ONE set per currency in the lines' own currency (the currency the bank lines are in), in major units: gross, the copies and own_company movements it holds, and net, the figure to quote. Never add two sets, and never convert one. It is null when the figures could not be read. totals_unreadable_count counts the lines with no readable amount, which sit in no figure.

possible_duplicates holds the money of the bank lines that are half of a pair Well cannot tell apart (two lines of the same amount to the same supplier on the same day): the second line of such a pair is left out of net until the person says both are real payments, so net counts that money once. possible_duplicate_pairs lists those pairs, one line each: the supplier, the amount of ONE of the two lines, the two days, the two movement ids and the namespace its answer is saved under. Show one line per pair and ask the person once: are both lines real payments (keep) or does the second one repeat the first (drop)? Record each answer on its own with well_upsert_preference: key missing_invoice_duplicate_verdicts, scope workspace, the pair's namespace as namespace, value { "decision": "keep" | "drop" }. A keep puts the second line back in the total, a drop keeps it out, and either way the pair is never asked again. Never decide the answer yourself. A run with nobody present asks nothing and stores nothing: it names the held amount in its one line.

bank_connected is true when the workspace has a bank feed connected: synced, syncing, or in error. It is false when no bank feed is connected, or every one is disabled or not set up. Only a live bank feed counts: a workspace with imported bank statements only reads false too. Then Well sees no bank spend for the week, so its figures cannot say that nothing is missing: the week could not be checked.

largest_suppliers names the 3 suppliers of supplier_count with the most spend still missing an invoice, biggest first, a supplier with no figure last: each with its name, its tx_count, its base_total_amount in currency, without a line held out as a possible duplicate (null when a line has no exchange rate, or when the amount of a held line is unknown) and its available_routes, the order to look for its invoices in, as on the rows of well_list_missing_invoices (mail_search when the caller's own Gmail is connected). other_supplier_count counts the suppliers of supplier_count it leaves out, and other_suppliers_total is their spend in currency, summed by Well. other_suppliers_total is null when no supplier is left out, when one of them has no figure, or when candidates_truncated is true: then quote the count alone. Never compute it from total, and never from totals_by_currency.

pending_count counts the transactions of those suppliers whose candidate invoice already waits for a confirmation. They are in supplier_count and total, as on the card. unattributed_group_count counts the groups of spend with no named supplier, and unattributed_transaction_count the transactions those groups hold. They are not in supplier_count, transaction_count or total, and they are in totals_by_currency. candidates_truncated: true means the scan filled its page, so supplier_count, total and pending_count are floors; totals_by_currency is read apart and still covers every line.

This tool reads the user's data and changes none of it.

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

NameRequiredDescriptionDefault
weekNoISO week, YYYY-Www (Monday to Sunday). It must have ended, unless `through_today` is true. Omit it for the last ended week, or for the running week with `through_today`. Never with `from_month`.
to_monthNoLast calendar month to sum, YYYY-MM, at most 3 months after `from_month` counted inclusive. Needs `from_month`.
from_monthNoFirst calendar month to sum, YYYY-MM. Alone it reads that one month. Never with `week`.
workspace_idNoTarget 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.
through_todayNoRead the running week, or a running last month, up to today. Set it to true for "this week" or for months that end with the current one; false reads like absent. The result has `is_complete: false` while the window runs.
conversation_idNoThe 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_scopeNoRestrict 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

NameRequiredDescriptionDefault
toNoLast day of the window, YYYY-MM-DD, inclusive: the Sunday, the last day of `to_month`, or today for a running week or month read through today.
fromNoFirst day read, YYYY-MM-DD: the Monday of the week, or the first day of `from_month`.
weekNo
errorNo
totalNoThe named suppliers' groups only, in the base currency, without a line held out as a possible duplicate. Null when a line has no exchange rate, or when the amount of a held line is unknown because the read's sample does not carry it.
successYes
currencyNoThe workspace base currency (ISO 4217) `total` is converted to. Write `total` with its symbol or code, never the currency of the person's language.
to_monthNoLast month read, YYYY-MM. Present on a month read only.
error_codeNo
from_monthNoFirst month read, YYYY-MM. Present on a month read only.
is_completeNoFalse when the window ends today and has not ended: the figures cover the days so far.
workspace_idNo
pending_countNoAbsent on a month read.
bank_connectedNoTrue when a bank feed is connected (synced, syncing or in error). False means the week could not be checked.
supplier_countNo
conversation_idNoThe conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation.
newly_connectedNoTools 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.
largest_suppliersNoThe 3 suppliers with the most spend still missing an invoice, biggest first.
transaction_countNoThe transactions of the counted suppliers that still miss an invoice.
resolved_workspaceNoThe workspace that answered, when the caller named none and the token authorizes several.
totals_by_currencyNoThe week's money still missing an invoice, one set per currency in the lines' own currency. Null when unreadable.
candidates_truncatedNo
conversation_id_noteNoPresent only when the server opened a fresh lane, stating that no choice recorded earlier was read.
other_supplier_countNoThe suppliers of `supplier_count` that `largest_suppliers` leaves out.
other_suppliers_totalNoThe spend of the suppliers `largest_suppliers` leaves out, in `currency`, summed by Well. Null when none is left out, one has no figure, or the read was cut.
conversation_id_sourceNoWhere the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened.
totals_unreadable_countNoLines with no readable amount, in no figure of `totals_by_currency`. Null with it.
possible_duplicate_pairsNoThe pairs of bank lines Well cannot tell apart: two lines of the same amount to the same supplier on the same day, with no invoice behind either. The SECOND line of each pair is held out of `net` and sits in `possible_duplicates`, so the total counts the money once. Ask the person whether both lines are real payments (`keep`) or the second one repeats the first (`drop`), and record each answer with `well_upsert_preference` under the key `missing_invoice_duplicate_verdicts`, `scope: "workspace"` and the `namespace` of the pair, value `{ "decision": "keep" | "drop" }`: a `keep` puts the line back in the total, a `drop` keeps it out, and either way the pair is never asked again. Empty when the read found no such pair.
unattributed_group_countNo
unattributed_transaction_countNoThe transactions of the groups with no named supplier, which are not in `transaction_count`.
possible_duplicates_unavailableNoTrue when the possible-duplicate check could not run, or its pair list was cut at its cap: some pairs may be missing from `total` and `possible_duplicate_pairs`. Say in one plain line that possible duplicates could not be checked, then quote the figures as they come.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedOutput schema / properties / largest_suppliers / items / properties / base_total_amount / description
      Previous value: -"The supplier's spend still missing an invoice, in `currency`. Null when a line has no exchange rate."New value: +"The supplier's spend still missing an invoice, in `currency`, without a line held out as a possible duplicate. Null when a line has no exchange rate, or when the amount of a held line is unknown because the read's sample does not carry it."
    • addedOutput schema / properties / possible_duplicate_pairs
      Added value: +{
      +  "description": "The pairs of bank lines Well cannot tell apart: two lines of the same amount to the same supplier on the same day, with no invoice behind either. The SECOND line of each pair is held out of `net` and sits in `possible_duplicates`, so the total counts the money once. Ask the person whether both lines are real payments (`keep`) or the second one repeats the first (`drop`), and record each answer with `well_upsert_preference` under the key `missing_invoice_duplicate_verdicts`, `scope: \"workspace\"` and the `namespace` of the pair, value `{ \"decision\": \"keep\" | \"drop\" }`: a `keep` puts the line back in the total, a `drop` keeps it out, and either way the pair is never asked again. Empty when the read found no such pair.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "amount": {
      +        "description": "The magnitude of ONE of the two lines, in `currency`.",
      +        "type": "number"
      +      },
      +      "company_id": {
      +        "description": "The supplier both lines paid.",
      +        "type": "string"
      +      },
      +      "company_name": {
      +        "description": "The supplier's name, when the gap could resolve one.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "currency": {
      +        "description": "The currency of the two lines; null when the bank line carries none.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "first_day": {
      +        "description": "The day the first line posted on, `YYYY-MM-DD`.",
      +        "type": "string"
      +      },
      +      "movement_ids": {
      +        "description": "The two lines of the pair, earliest first. The second one is the line held out of the total.",
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "namespace": {
      +        "description": "The namespace the answer about this pair is saved under: pass it as `namespace` to `well_upsert_preference`, with `scope: \"workspace\"`, so the same pair is never asked again.",
      +        "type": "string"
      +      },
      +      "second_day": {
      +        "description": "The day the second line posted on, `YYYY-MM-DD`.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "namespace",
      +      "company_id",
      +      "company_name",
      +      "amount",
      +      "currency",
      +      "first_day",
      +      "second_day",
      +      "movement_ids"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / possible_duplicates_unavailable
      Added value: +{
      +  "description": "True when the possible-duplicate check could not run, or its pair list was cut at its cap: some pairs may be missing from `total` and `possible_duplicate_pairs`. Say in one plain line that possible duplicates could not be checked, then quote the figures as they come.",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / total / description
      Previous value: -"The named suppliers' groups only, in the base currency. Null when a line has no exchange rate."New value: +"The named suppliers' groups only, in the base currency, without a line held out as a possible duplicate. Null when a line has no exchange rate, or when the amount of a held line is unknown because the read's sample does not carry it."
    • changedOutput schema / properties / totals_by_currency / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "copies": {
      -          "description": "The part of `gross` that repeats a payment already counted through another connection of the same account.",
      -          "type": "number"
      -        },
      -        "currency": {
      -          "description": "The one currency every figure of this set is in. Null for lines that carry no currency.",
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "gross": {
      -          "description": "Every line in this currency, copies and own-account movements included.",
      -          "type": "number"
      -        },
      -        "net": {
      -          "description": "`gross` minus `copies` minus `own_company`. This is the figure to quote.",
      -          "type": "number"
      -        },
      -        "own_company": {
      -          "description": "The part of `gross` that moved between the workspace's own accounts, so it is not spend.",
      -          "type": "number"
      -        }
      -      },
      -      "required": [
      -        "currency",
      -        "gross",
      -        "copies",
      -        "own_company",
      -        "net"
      -      ],
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "copies": {
      +          "description": "The part of `gross` that repeats a payment already counted through another connection of the same account.",
      +          "type": "number"
      +        },
      +        "currency": {
      +          "description": "The one currency every figure of this set is in. Null for lines that carry no currency.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "gross": {
      +          "description": "Every line in this currency, copies and own-account movements included.",
      +          "type": "number"
      +        },
      +        "net": {
      +          "description": "`gross` minus `copies` minus `own_company` minus `possible_duplicates`. This is the figure to quote.",
      +          "type": "number"
      +        },
      +        "own_company": {
      +          "description": "The part of `gross` that moved between the workspace's own accounts, so it is not spend.",
      +          "type": "number"
      +        },
      +        "possible_duplicates": {
      +          "description": "The part of `gross` that sits on a bank line Well cannot tell apart from another line of the same amount to the same supplier on the same day. It is kept out of `net` until the person says the line is a real payment.",
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "currency",
      +        "gross",
      +        "copies",
      +        "own_company",
      +        "possible_duplicates",
      +        "net"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Changed11 schema fields changed
    • removedOutput schema / properties / largest_suppliers / items / properties / base_total_amount / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / largest_suppliers / items / properties / base_total_amount / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / largest_suppliers / items / properties / company_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / largest_suppliers / items / properties / company_id / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / other_suppliers_total / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / other_suppliers_total / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / resolved_workspace / properties / name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / resolved_workspace / properties / name / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / total / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / total / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • changedOutput schema / properties / totals_by_currency / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "copies": {
      -          "description": "The part of `gross` that repeats a payment already counted through another connection of the same account.",
      -          "type": "number"
      -        },
      -        "currency": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "description": "The one currency every figure of this set is in. Null for lines that carry no currency."
      -        },
      -        "gross": {
      -          "description": "Every line in this currency, copies and own-account movements included.",
      -          "type": "number"
      -        },
      -        "net": {
      -          "description": "`gross` minus `copies` minus `own_company`. This is the figure to quote.",
      -          "type": "number"
      -        },
      -        "own_company": {
      -          "description": "The part of `gross` that moved between the workspace's own accounts, so it is not spend.",
      -          "type": "number"
      -        }
      -      },
      -      "required": [
      -        "currency",
      -        "gross",
      -        "copies",
      -        "own_company",
      -        "net"
      -      ],
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "copies": {
      +          "description": "The part of `gross` that repeats a payment already counted through another connection of the same account.",
      +          "type": "number"
      +        },
      +        "currency": {
      +          "description": "The one currency every figure of this set is in. Null for lines that carry no currency.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "gross": {
      +          "description": "Every line in this currency, copies and own-account movements included.",
      +          "type": "number"
      +        },
      +        "net": {
      +          "description": "`gross` minus `copies` minus `own_company`. This is the figure to quote.",
      +          "type": "number"
      +        },
      +        "own_company": {
      +          "description": "The part of `gross` that moved between the workspace's own accounts, so it is not spend.",
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "currency",
      +        "gross",
      +        "copies",
      +        "own_company",
      +        "net"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  3. Changed3 schema fields changed
    • addedOutput schema / properties / largest_suppliers
      Added value: +{
      +  "description": "The 3 suppliers with the most spend still missing an invoice, biggest first.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "available_routes": {
      +        "description": "The order to look for the supplier's invoices in; `mail_search` when the caller's Gmail is connected.",
      +        "items": {
      +          "enum": [
      +            "mail_search",
      +            "chrome_extension_fetch",
      +            "cloud_portal_fetch",
      +            "connect_provider",
      +            "manual_upload"
      +          ],
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "base_total_amount": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "The supplier's spend still missing an invoice, in `currency`. Null when a line has no exchange rate."
      +      },
      +      "company_id": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "tx_count": {
      +        "maximum": 9007199254740991,
      +        "minimum": -9007199254740991,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "company_id",
      +      "name",
      +      "tx_count",
      +      "base_total_amount",
      +      "available_routes"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / other_supplier_count
      Added value: +{
      +  "description": "The suppliers of `supplier_count` that `largest_suppliers` leaves out.",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / other_suppliers_total
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "The spend of the suppliers `largest_suppliers` leaves out, in `currency`, summed by Well. Null when none is left out, one has no figure, or the read was cut."
      +}
  4. Changed13 schema fields changed
    • addedInput schema / properties / from_month
      Added value: +{
      +  "description": "First calendar month to sum, YYYY-MM. Alone it reads that one month. Never with `week`.",
      +  "pattern": "^(\\d{4})-(0[1-9]|1[0-2])$",
      +  "type": "string"
      +}
    • changedInput schema / properties / through_today / description
      Previous value: -"Read the running week up to today. Set it to true for \"this week\"; false reads like absent. The result has `is_complete: false` while the week runs."New value: +"Read the running week, or a running last month, up to today. Set it to true for \"this week\" or for months that end with the current one; false reads like absent. The result has `is_complete: false` while the window runs."
    • addedInput schema / properties / to_month
      Added value: +{
      +  "description": "Last calendar month to sum, YYYY-MM, at most 3 months after `from_month` counted inclusive. Needs `from_month`.",
      +  "pattern": "^(\\d{4})-(0[1-9]|1[0-2])$",
      +  "type": "string"
      +}
    • changedInput schema / properties / week / description
      Previous value: -"ISO week, YYYY-Www (Monday to Sunday). It must have ended, unless `through_today` is true. Omit it for the last ended week, or for the running week with `through_today`."New value: +"ISO week, YYYY-Www (Monday to Sunday). It must have ended, unless `through_today` is true. Omit it for the last ended week, or for the running week with `through_today`. Never with `from_month`."
    • changedOutput schema / properties / error_code / enum
      Previous value: -[
      -  "week_invalid",
      -  "week_not_ended",
      -  "no_workspace",
      -  "read_failed"
      -]New value: +[
      +  "week_invalid",
      +  "week_not_ended",
      +  "months_invalid",
      +  "months_too_many",
      +  "month_not_ended",
      +  "month_not_started",
      +  "no_workspace",
      +  "read_failed",
      +  "read_timed_out"
      +]
    • changedOutput schema / properties / from / description
      Previous value: -"Monday of the week, YYYY-MM-DD."New value: +"First day read, YYYY-MM-DD: the Monday of the week, or the first day of `from_month`."
    • addedOutput schema / properties / from_month
      Added value: +{
      +  "description": "First month read, YYYY-MM. Present on a month read only.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / is_complete / description
      Previous value: -"False when the window ends today and the week has not ended: the figures cover the days so far."New value: +"False when the window ends today and has not ended: the figures cover the days so far."
    • addedOutput schema / properties / pending_count / description
      Added value: +"Absent on a month read."
    • changedOutput schema / properties / to / description
      Previous value: -"Last day of the window, YYYY-MM-DD, inclusive: the Sunday, or today for a running week read through today."New value: +"Last day of the window, YYYY-MM-DD, inclusive: the Sunday, the last day of `to_month`, or today for a running week or month read through today."
    • addedOutput schema / properties / to_month
      Added value: +{
      +  "description": "Last month read, YYYY-MM. Present on a month read only.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / transaction_count
      Added value: +{
      +  "description": "The transactions of the counted suppliers that still miss an invoice.",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / unattributed_transaction_count
      Added value: +{
      +  "description": "The transactions of the groups with no named supplier, which are not in `transaction_count`.",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
  5. Changed4 schema fields changed
    • addedInput schema / properties / through_today
      Added value: +{
      +  "description": "Read the running week up to today. Set it to true for \"this week\"; false reads like absent. The result has `is_complete: false` while the week runs.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / week / description
      Previous value: -"ISO week that has ended, YYYY-Www (Monday to Sunday). Omit it for the last ended week."New value: +"ISO week, YYYY-Www (Monday to Sunday). It must have ended, unless `through_today` is true. Omit it for the last ended week, or for the running week with `through_today`."
    • addedOutput schema / properties / is_complete
      Added value: +{
      +  "description": "False when the window ends today and the week has not ended: the figures cover the days so far.",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / to / description
      Previous value: -"Sunday of the week, YYYY-MM-DD, inclusive."New value: +"Last day of the window, YYYY-MM-DD, inclusive: the Sunday, or today for a running week read through today."
  6. Changed5 schema fields changed
    • addedOutput schema / properties / currency / description
      Added value: +"The workspace base currency (ISO 4217) `total` is converted to. Write `total` with its symbol or code, never the currency of the person's language."
    • changedOutput schema / properties / newly_connected / description
      Previous value: -"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. Start the reply with 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."New value: +"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."
    • changedOutput schema / properties / total / description
      Previous value: -"Null when a line has no exchange rate."New value: +"The named suppliers' groups only, in the base currency. Null when a line has no exchange rate."
    • addedOutput schema / properties / totals_by_currency
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "copies": {
      +            "description": "The part of `gross` that repeats a payment already counted through another connection of the same account.",
      +            "type": "number"
      +          },
      +          "currency": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "The one currency every figure of this set is in. Null for lines that carry no currency."
      +          },
      +          "gross": {
      +            "description": "Every line in this currency, copies and own-account movements included.",
      +            "type": "number"
      +          },
      +          "net": {
      +            "description": "`gross` minus `copies` minus `own_company`. This is the figure to quote.",
      +            "type": "number"
      +          },
      +          "own_company": {
      +            "description": "The part of `gross` that moved between the workspace's own accounts, so it is not spend.",
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "currency",
      +          "gross",
      +          "copies",
      +          "own_company",
      +          "net"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "The week's money still missing an invoice, one set per currency in the lines' own currency. Null when unreadable."
      +}
    • addedOutput schema / properties / totals_unreadable_count
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Lines with no readable amount, in no figure of `totals_by_currency`. Null with it."
      +}
  7. Changed1 schema field changed
    • addedOutput schema / properties / bank_connected
      Added value: +{
      +  "description": "True when a bank feed is connected (synced, syncing or in error). False means the week could not be checked.",
      +  "type": "boolean"
      +}
  8. Changed1 schema field changed
    • addedInput schema / properties / workspace_scope
      Added value: +{
      +  "description": "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.",
      +  "enum": [
      +    "family"
      +  ],
      +  "type": "string"
      +}
  9. Changed1 schema field changed
    • addedOutput schema / properties / newly_connected
      Added value: +{
      +  "description": "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. Start the reply with 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.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "name": {
      +        "type": "string"
      +      },
      +      "service_id": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "service_id"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  10. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint/destructiveHint=false, but the description adds extensive behavior beyond them: null-sum semantics, the possible-duplicate hold rule, bank_connected meaning, candidates_truncated floors, and a full error_code catalog. It reinforces the read-only nature with 'This tool reads the user's data and changes none of it.'

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

Conciseness3/5

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

The purpose is front-loaded and paragraphs are topically organized, but the text is extremely long and repetitive—error codes, is_complete semantics, and duplicate-handling explain the same concepts in multiple places. Much content earns its place, but the sheer volume and duplication burden an agent parsing it.

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 complex aggregation tool with 7 parameters and an output schema, the description leaves little ambiguity: it explains every field group, null conditions, truncation behavior, and duplicate-verdict workflow. Combined with annotations and the output schema, an agent has everything needed to call it correctly.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: the week format example (2026-W40), that a week 'has ended when its Sunday has ended in the workspace time zone,' month-read return shape (from_month/to_month in place of week, no pending_count), and the mutual-exclusion refusal codes. This goes beyond the schema's field descriptions.

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 description opens with a specific verb+resource+scope: 'The missing supplier invoices of one ISO week, or of up to 3 calendar months, as one total,' and enumerates the output (supplier/transaction/spend counts). It explicitly states 'It returns no rows,' distinguishing it from row-returning siblings like well_list_missing_invoices whose rows carry available_routes.

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?

It gives strong context on when to use week vs from_month/to_month vs through_today, and clear workspace-routing guidance ('call this directly — no workspace call is needed first' for single-workspace tokens, pass workspace_id for multi). What it lacks is an explicit statement contrasting this tool with the aggregate siblings well_sum_invoices or the row tool well_list_missing_invoices as an alternative choice.

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.

Resources