Skip to main content
Glama

Sum outstanding receivables

well_sum_receivables
Read-only

What the workspace's customers still owe it: the outstanding receivables, one figure per currency, with the overdue part and an aging breakdown. It draws nothing.

Use it for any total of what customers owe: "who owes us money", "how much are we owed", "how much is overdue". State the totals it returns and do not add up rows yourself, and do not page well_query_records to rebuild a total: this read sums every outstanding invoice on the server, so the same question gives the same figure each time. For the invoices behind the figure (which customer, which invoice), read the rows with well_show_records.

The rule is fixed, and rule echoes it. An invoice counts as owed when the workspace is the issuer and the customer the receiver, it is a billing document (rule.document_types, or no type at all; never a proforma, quote, order or credit note), it is not a draft or canceled, its payment status is unpaid or partial, and balance_due is above zero. The amount is balance_due, so a part-paid invoice counts for what is left. Payment status decides, never balance_due alone: an invoice a connector calls settled keeps a balance until a bank payment matches it.

Every figure is per currency and never converted. currencies holds one row per currency. Do not add two rows without converting them at a rate you can state. Each row has outstanding_count and outstanding_total, the overdue_count and overdue_total part past its due date, and aging: the bands current (not yet due, or due today), 1_30, 31_60, 61_90 and over_90 days past due, every band present even at zero. The bands and the invoices with no due date add up to the outstanding total.

as_of is the instant of the read, and due dates are aged against as_of_date, the UTC calendar date. Give as_of beside every figure.

What the figure leaves out is returned so you can say it:

  • no_due_date_count and no_due_date_total (per row): outstanding invoices with no due date. They are in the outstanding total and in no aging band, and no other date stands in for a missing due date.

  • marked_paid_count and marked_paid_total (per row): issued invoices a connector says are settled with no bank payment matched yet, with a balance left. They are NOT in the outstanding total. State them on their own line.

  • draft_count and draft_total (per row): draft invoices with a balance left, at any payment status except unknown. A draft at marked_paid is counted here, not in the marked-paid line. An imported sales invoice often stays a draft while it is owed. They are NOT in the outstanding total. State them on their own line.

  • unsettled_credit_note_count and unsettled_credit_note_total (per row): issued credit notes still unpaid or part paid with a balance left. The read does not tell a note linked to its invoice from one that is not, so say "credit notes with a balance left", never "unlinked". They are NOT in the outstanding total and are NOT subtracted from it. State them on their own line.

  • unknown_payment_status_count: invoices, drafts included, whose payment status could not be worked out. Their balance is not trusted, so they are in no figure and in no draft line. null means the count failed, which is not 0.

  • unattributed_count: outstanding-looking invoices Well could place on neither side. They may be owed to the workspace and are in no figure. null means the count failed, and it is also null when customer_ids narrows the read.

  • no_currency_count: invoices with no currency, among the outstanding ones and among the marked-paid, draft and credit-note lines. They are in no row. null means the count failed.

  • no_balance_count: unpaid or part-paid invoices, drafts included, with no balance_due recorded, so no amount to count. In no figure. null means the count failed.

  • outstanding_payment_unknown_count: invoices that ARE counted in outstanding and in its figure, but whose payment cannot be seen because the workspace holds no bank line within 90 days of their dates (rule.outstanding_payment_unknown). It is an "of which" of the outstanding count: never add it to a total, never list it as a held-back line, never subtract it from the figure. It is not unknown_payment_status_count: that count is a recompute that halted (balance not trusted, in no figure), while this one is counted in outstanding but no bank line covers the invoice's dates, so whether it was paid cannot be seen. Never say those invoices are unpaid for certain, and never say nothing is owed because no payment was matched. State it only when it is above 0: at 0 say nothing about it. null means the count failed.

  • party_scope: when party_scope.side_unknown is true the workspace has no resolved own company, so no side filter was applied: the figures cover every invoice on both sides, and the side is not known. Say the side is unknown, never that the figure is what customers owe. State every count beside the total, even at zero, so a reader can tell a clean read from a silent one, except outstanding_payment_unknown_count: it is an "of which" note, not a figure the reader asked for. Never count rows yourself to fill one in.

customer_ids narrows the read to those customers (company ids, at most 20). It matches each company id exactly, and one customer can exist as several company rows (aliases), so pass every company id that names the customer or the figure leaves out the invoices filed under the others. Omit it for every customer.

partial: true means the aggregate was cut short and every figure is a FLOOR. When success is false the read failed: the empty currencies is not a measured zero.

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

TableJSON Schema
NameRequiredDescriptionDefault
customer_idsNoCompany ids of the customers to restrict the figure to. Each id matches exactly, so include every company id that names the same customer, aliases included. Omit for every customer; see the description.
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.
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

TableJSON Schema
NameRequiredDescriptionDefault
ruleYes
sumsYesThe four-way own-side partition of the measured set. `proven` cells hold only rows the stored facts prove; `estimated` cells hold the rows a weak claim sides (inside `unattributed`, never inside `proven`); `unattributed` is the unknown remainder with the direction twin's `by_reason` split; `no_currency` counts measured rows with no currency. `available: false` means a cell read failed — a partial block would not add up, so the block is omitted rather than floored.
as_ofYes
errorNo
partialYes
successYes
as_of_dateYes
currenciesYes
party_scopeYesWhat the receivable side resolved to. `side_unknown: true` means the workspace resolved no own company, so NO side filter was applied (`applied: false`) and every figure covers invoices on both sides — say the side is unknown, never that the figure is what customers owe. `null` when no read reported a scope resolution.
completenessYes
customer_idsYes
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.
no_balance_countYes
no_currency_countYes
resolved_workspaceNoThe workspace that answered, when the caller named none and the token authorizes several.
unattributed_countYes
conversation_id_noteNoPresent only when the server opened a fresh lane, stating that no choice recorded earlier was read.
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.
unknown_payment_status_countYes
outstanding_payment_unknown_countYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / completeness / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "description": "How far the workspace's own-side resolution lets a caller trust the figure: the self-party set's size and truncation, and the counts of the rows it could not prove a side for. `unattributed_count` is the certainty-unknown remainder; `estimated` counts the rows a weak claim still sides, unavailable when the set was truncated or the read failed. A null count is an unread cell, never a measured zero.",
      -    "properties": {
      -      "conflict_count": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "estimated": {
      -        "anyOf": [
      -          {
      -            "additionalProperties": false,
      -            "properties": {
      -              "available": {
      -                "const": true,
      -                "type": "boolean"
      -              },
      -              "count": {
      -                "type": "number"
      -              },
      -              "kinds": {
      -                "items": {
      -                  "enum": [
      -                    "own_set_self_candidate",
      -                    "asserted_own_side_unqualified",
      -                    "bank_allocation"
      -                  ],
      -                  "type": "string"
      -                },
      -                "type": "array"
      -              }
      -            },
      -            "required": [
      -              "available",
      -              "count",
      -              "kinds"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "additionalProperties": false,
      -            "properties": {
      -              "available": {
      -                "const": false,
      -                "type": "boolean"
      -              },
      -              "reason": {
      -                "enum": [
      -                  "own_set_truncated",
      -                  "read_failed"
      -                ],
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "available",
      -              "reason"
      -            ],
      -            "type": "object"
      -          }
      -        ]
      -      },
      -      "intra_self_count": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "personal_mode": {
      -        "type": "boolean"
      -      },
      -      "self_candidate_count": {
      -        "type": "number"
      -      },
      -      "self_set_size": {
      -        "type": "number"
      -      },
      -      "self_set_truncated": {
      -        "type": "boolean"
      -      },
      -      "unattributed_count": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      }
      -    },
      -    "required": [
      -      "self_set_size",
      -      "self_set_truncated",
      -      "self_candidate_count",
      -      "personal_mode",
      -      "unattributed_count",
      -      "intra_self_count",
      -      "conflict_count",
      -      "estimated"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "description": "How far the workspace's own-side resolution lets a caller trust the figure: the self-party set's size and truncation, and the counts of the rows it could not prove a side for. `unattributed_count` is the certainty-unknown remainder; `estimated` counts the rows a weak claim still sides, unavailable when the set was truncated or the read failed. A null count is an unread cell, never a measured zero.",
      +    "properties": {
      +      "conflict_count": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "estimated": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "available": {
      +                "const": true,
      +                "type": "boolean"
      +              },
      +              "count": {
      +                "type": "number"
      +              },
      +              "kinds": {
      +                "items": {
      +                  "enum": [
      +                    "own_set_self_candidate",
      +                    "asserted_own_side_unqualified",
      +                    "bank_allocation"
      +                  ],
      +                  "type": "string"
      +                },
      +                "type": "array"
      +              }
      +            },
      +            "required": [
      +              "available",
      +              "count",
      +              "kinds"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "available": {
      +                "const": false,
      +                "type": "boolean"
      +              },
      +              "reason": {
      +                "enum": [
      +                  "own_set_truncated",
      +                  "read_failed"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "available",
      +              "reason"
      +            ],
      +            "type": "object"
      +          }
      +        ]
      +      },
      +      "fold_version": {
      +        "maximum": 9007199254740991,
      +        "minimum": -9007199254740991,
      +        "type": "integer"
      +      },
      +      "intra_self_count": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "personal_mode": {
      +        "type": "boolean"
      +      },
      +      "self_candidate_count": {
      +        "type": "number"
      +      },
      +      "self_set_size": {
      +        "type": "number"
      +      },
      +      "self_set_truncated": {
      +        "type": "boolean"
      +      },
      +      "unattributed_count": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      }
      +    },
      +    "required": [
      +      "fold_version",
      +      "self_set_size",
      +      "self_set_truncated",
      +      "self_candidate_count",
      +      "personal_mode",
      +      "unattributed_count",
      +      "intra_self_count",
      +      "conflict_count",
      +      "estimated"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Changed8 schema fields changed
    • addedOutput schema / properties / completeness
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "description": "How far the workspace's own-side resolution lets a caller trust the figure: the self-party set's size and truncation, and the counts of the rows it could not prove a side for. `unattributed_count` is the certainty-unknown remainder; `estimated` counts the rows a weak claim still sides, unavailable when the set was truncated or the read failed. A null count is an unread cell, never a measured zero.",
      +      "properties": {
      +        "conflict_count": {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "estimated": {
      +          "anyOf": [
      +            {
      +              "additionalProperties": false,
      +              "properties": {
      +                "available": {
      +                  "const": true,
      +                  "type": "boolean"
      +                },
      +                "count": {
      +                  "type": "number"
      +                },
      +                "kinds": {
      +                  "items": {
      +                    "enum": [
      +                      "own_set_self_candidate",
      +                      "asserted_own_side_unqualified",
      +                      "bank_allocation"
      +                    ],
      +                    "type": "string"
      +                  },
      +                  "type": "array"
      +                }
      +              },
      +              "required": [
      +                "available",
      +                "count",
      +                "kinds"
      +              ],
      +              "type": "object"
      +            },
      +            {
      +              "additionalProperties": false,
      +              "properties": {
      +                "available": {
      +                  "const": false,
      +                  "type": "boolean"
      +                },
      +                "reason": {
      +                  "enum": [
      +                    "own_set_truncated",
      +                    "read_failed"
      +                  ],
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "available",
      +                "reason"
      +              ],
      +              "type": "object"
      +            }
      +          ]
      +        },
      +        "intra_self_count": {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "personal_mode": {
      +          "type": "boolean"
      +        },
      +        "self_candidate_count": {
      +          "type": "number"
      +        },
      +        "self_set_size": {
      +          "type": "number"
      +        },
      +        "self_set_truncated": {
      +          "type": "boolean"
      +        },
      +        "unattributed_count": {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        }
      +      },
      +      "required": [
      +        "self_set_size",
      +        "self_set_truncated",
      +        "self_candidate_count",
      +        "personal_mode",
      +        "unattributed_count",
      +        "intra_self_count",
      +        "conflict_count",
      +        "estimated"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • 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."
    • addedOutput schema / properties / outstanding_payment_unknown_count
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / party_scope
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "applied": {
      +          "type": "boolean"
      +        },
      +        "requested": {
      +          "enum": [
      +            "purchase",
      +            "sales",
      +            "intra_self",
      +            "unattributed"
      +          ],
      +          "type": "string"
      +        },
      +        "side_unknown": {
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "requested",
      +        "applied",
      +        "side_unknown"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "What the receivable side resolved to. `side_unknown: true` means the workspace resolved no own company, so NO side filter was applied (`applied: false`) and every figure covers invoices on both sides — say the side is unknown, never that the figure is what customers owe. `null` when no read reported a scope resolution."
      +}
    • addedOutput schema / properties / rule / properties / outstanding_payment_unknown
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "added_to_total": {
      +      "const": false,
      +      "type": "boolean"
      +    },
      +    "basis": {
      +      "const": "no bank line of the workspace within window_days of the invoice's dates",
      +      "type": "string"
      +    },
      +    "of_which": {
      +      "const": "outstanding",
      +      "type": "string"
      +    },
      +    "window_days": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "of_which",
      +    "basis",
      +    "window_days",
      +    "added_to_total"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / properties / rule / required
      Previous value: -[
      -  "outstanding_payment_statuses",
      -  "held_back_payment_statuses",
      -  "excluded_invoice_statuses",
      -  "document_types",
      -  "untyped_documents_count",
      -  "credit_note_document_types",
      -  "amount",
      -  "aged_by",
      -  "day_basis",
      -  "aging_bands"
      -]New value: +[
      +  "outstanding_payment_statuses",
      +  "held_back_payment_statuses",
      +  "excluded_invoice_statuses",
      +  "document_types",
      +  "untyped_documents_count",
      +  "credit_note_document_types",
      +  "amount",
      +  "aged_by",
      +  "day_basis",
      +  "aging_bands",
      +  "outstanding_payment_unknown"
      +]
    • addedOutput schema / properties / sums
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "available": {
      +          "const": true,
      +          "type": "boolean"
      +        },
      +        "by_counterparty": {
      +          "anyOf": [
      +            {
      +              "additionalProperties": false,
      +              "properties": {
      +                "available": {
      +                  "const": true,
      +                  "type": "boolean"
      +                },
      +                "rows": {
      +                  "items": {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "count": {
      +                        "type": "number"
      +                      },
      +                      "currency": {
      +                        "anyOf": [
      +                          {
      +                            "type": "string"
      +                          },
      +                          {
      +                            "type": "null"
      +                          }
      +                        ]
      +                      },
      +                      "issuer_company_id": {
      +                        "anyOf": [
      +                          {
      +                            "type": "string"
      +                          },
      +                          {
      +                            "type": "null"
      +                          }
      +                        ]
      +                      },
      +                      "receiver_company_id": {
      +                        "anyOf": [
      +                          {
      +                            "type": "string"
      +                          },
      +                          {
      +                            "type": "null"
      +                          }
      +                        ]
      +                      },
      +                      "total": {
      +                        "anyOf": [
      +                          {
      +                            "type": "number"
      +                          },
      +                          {
      +                            "type": "null"
      +                          }
      +                        ]
      +                      }
      +                    },
      +                    "required": [
      +                      "issuer_company_id",
      +                      "receiver_company_id",
      +                      "currency",
      +                      "total",
      +                      "count"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "type": "array"
      +                },
      +                "truncated": {
      +                  "type": "boolean"
      +                }
      +              },
      +              "required": [
      +                "available",
      +                "rows",
      +                "truncated"
      +              ],
      +              "type": "object"
      +            },
      +            {
      +              "additionalProperties": false,
      +              "properties": {
      +                "available": {
      +                  "const": false,
      +                  "type": "boolean"
      +                },
      +                "reason": {
      +                  "const": "read_failed",
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "available",
      +                "reason"
      +              ],
      +              "type": "object"
      +            }
      +          ]
      +        },
      +        "estimated": {
      +          "items": {
      +            "anyOf": [
      +              {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "available": {
      +                    "const": true,
      +                    "type": "boolean"
      +                  },
      +                  "kind": {
      +                    "enum": [
      +                      "own_set_self_candidate",
      +                      "asserted_own_side_unqualified",
      +                      "bank_allocation"
      +                    ],
      +                    "type": "string"
      +                  },
      +                  "purchase": {
      +                    "anyOf": [
      +                      {
      +                        "additionalProperties": false,
      +                        "properties": {
      +                          "by_currency": {
      +                            "items": {
      +                              "additionalProperties": false,
      +                              "properties": {
      +                                "count": {
      +                                  "type": "number"
      +                                },
      +                                "currency": {
      +                                  "type": "string"
      +                                },
      +                                "total": {
      +                                  "anyOf": [
      +                                    {
      +                                      "type": "number"
      +                                    },
      +                                    {
      +                                      "type": "null"
      +                                    }
      +                                  ]
      +                                }
      +                              },
      +                              "required": [
      +                                "currency",
      +                                "total",
      +                                "count"
      +                              ],
      +                              "type": "object"
      +                            },
      +                            "type": "array"
      +                          },
      +                          "count": {
      +                            "type": "number"
      +                          }
      +                        },
      +                        "required": [
      +                          "count",
      +                          "by_currency"
      +                        ],
      +                        "type": "object"
      +                      },
      +                      {
      +                        "type": "null"
      +                      }
      +                    ]
      +                  },
      +                  "sales": {
      +                    "anyOf": [
      +                      {
      +                        "additionalProperties": false,
      +                        "properties": {
      +                          "by_currency": {
      +                            "items": {
      +                              "additionalProperties": false,
      +                              "properties": {
      +                                "count": {
      +                                  "type": "number"
      +                                },
      +                                "currency": {
      +                                  "type": "string"
      +                                },
      +                                "total": {
      +                                  "anyOf": [
      +                                    {
      +                                      "type": "number"
      +                                    },
      +                                    {
      +                                      "type": "null"
      +                                    }
      +                                  ]
      +                                }
      +                              },
      +                              "required": [
      +                                "currency",
      +                                "total",
      +                                "count"
      +                              ],
      +                              "type": "object"
      +                            },
      +                            "type": "array"
      +                          },
      +                          "count": {
      +                            "type": "number"
      +                          }
      +                        },
      +                        "required": [
      +                          "count",
      +                          "by_currency"
      +                        ],
      +                        "type": "object"
      +                      },
      +                      {
      +                        "type": "null"
      +                      }
      +                    ]
      +                  }
      +                },
      +                "required": [
      +                  "kind",
      +                  "available",
      +                  "sales",
      +                  "purchase"
      +                ],
      +                "type": "object"
      +              },
      +              {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "available": {
      +                    "const": false,
      +                    "type": "boolean"
      +                  },
      +                  "kind": {
      +                    "enum": [
      +                      "own_set_self_candidate",
      +                      "asserted_own_side_unqualified",
      +                      "bank_allocation"
      +                    ],
      +                    "type": "string"
      +                  },
      +                  "purchase": {
      +                    "type": "null"
      +                  },
      +                  "reason": {
      +                    "enum": [
      +                      "not_shipped",
      +                      "own_set_truncated",
      +                      "read_failed"
      +                    ],
      +                    "type": "string"
      +                  },
      +                  "sales": {
      +                    "type": "null"
      +                  }
      +                },
      +                "required": [
      +                  "kind",
      +                  "available",
      +                  "reason",
      +                  "sales",
      +                  "purchase"
      +                ],
      +                "type": "object"
      +              }
      +            ]
      +          },
      +          "type": "array"
      +        },
      +        "intra_self": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "by_currency": {
      +              "items": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "count": {
      +                    "type": "number"
      +                  },
      +                  "currency": {
      +                    "type": "string"
      +                  },
      +                  "total": {
      +                    "anyOf": [
      +                      {
      +                        "type": "number"
      +                      },
      +                      {
      +                        "type": "null"
      +                      }
      +                    ]
      +                  }
      +                },
      +                "required": [
      +                  "currency",
      +                  "total",
      +                  "count"
      +                ],
      +                "type": "object"
      +              },
      +              "type": "array"
      +            },
      +            "count": {
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "count",
      +            "by_currency"
      +          ],
      +          "type": "object"
      +        },
      +        "kind": {
      +          "enum": [
      +            "sided",
      +            "personal"
      +          ],
      +          "type": "string"
      +        },
      +        "measure": {
      +          "enum": [
      +            "items_total_net",
      +            "balance_due"
      +          ],
      +          "type": "string"
      +        },
      +        "no_currency": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "count": {
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "count"
      +          ],
      +          "type": "object"
      +        },
      +        "proven": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "purchase": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "by_currency": {
      +                  "items": {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "count": {
      +                        "type": "number"
      +                      },
      +                      "currency": {
      +                        "type": "string"
      +                      },
      +                      "total": {
      +                        "anyOf": [
      +                          {
      +                            "type": "number"
      +                          },
      +                          {
      +                            "type": "null"
      +                          }
      +                        ]
      +                      }
      +                    },
      +                    "required": [
      +                      "currency",
      +                      "total",
      +                      "count"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "type": "array"
      +                },
      +                "count": {
      +                  "type": "number"
      +                }
      +              },
      +              "required": [
      +                "count",
      +                "by_currency"
      +              ],
      +              "type": "object"
      +            },
      +            "sales": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "by_currency": {
      +                  "items": {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "count": {
      +                        "type": "number"
      +                      },
      +                      "currency": {
      +                        "type": "string"
      +                      },
      +                      "total": {
      +                        "anyOf": [
      +                          {
      +                            "type": "number"
      +                          },
      +                          {
      +                            "type": "null"
      +                          }
      +                        ]
      +                      }
      +                    },
      +                    "required": [
      +                      "currency",
      +                      "total",
      +                      "count"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "type": "array"
      +                },
      +                "count": {
      +                  "type": "number"
      +                }
      +              },
      +              "required": [
      +                "count",
      +                "by_currency"
      +              ],
      +              "type": "object"
      +            }
      +          },
      +          "required": [
      +            "sales",
      +            "purchase"
      +          ],
      +          "type": "object"
      +        },
      +        "scope": {
      +          "enum": [
      +            "purchase",
      +            "sales",
      +            "intra_self",
      +            "unattributed"
      +          ],
      +          "type": "string"
      +        },
      +        "unattributed": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "by_currency": {
      +              "items": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "count": {
      +                    "type": "number"
      +                  },
      +                  "currency": {
      +                    "type": "string"
      +                  },
      +                  "total": {
      +                    "anyOf": [
      +                      {
      +                        "type": "number"
      +                      },
      +                      {
      +                        "type": "null"
      +                      }
      +                    ]
      +                  }
      +                },
      +                "required": [
      +                  "currency",
      +                  "total",
      +                  "count"
      +                ],
      +                "type": "object"
      +              },
      +              "type": "array"
      +            },
      +            "by_reason": {
      +              "items": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "count": {
      +                    "type": "number"
      +                  },
      +                  "reason": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "reason",
      +                  "count"
      +                ],
      +                "type": "object"
      +              },
      +              "type": "array"
      +            },
      +            "count": {
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "count",
      +            "by_currency",
      +            "by_reason"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "available",
      +        "kind",
      +        "scope",
      +        "measure",
      +        "proven",
      +        "intra_self",
      +        "estimated",
      +        "unattributed",
      +        "no_currency"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "available": {
      +          "const": false,
      +          "type": "boolean"
      +        },
      +        "reason": {
      +          "const": "read_failed",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "available",
      +        "reason"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "description": "The four-way own-side partition of the measured set. `proven` cells hold only rows the stored facts prove; `estimated` cells hold the rows a weak claim sides (inside `unattributed`, never inside `proven`); `unattributed` is the unknown remainder with the direction twin's `by_reason` split; `no_currency` counts measured rows with no currency. `available: false` means a cell read failed — a partial block would not add up, so the block is omitted rather than floored."
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "as_of",
      -  "as_of_date",
      -  "currencies",
      -  "customer_ids",
      -  "unattributed_count",
      -  "unknown_payment_status_count",
      -  "no_currency_count",
      -  "no_balance_count",
      -  "partial",
      -  "rule",
      -  "success"
      -]New value: +[
      +  "as_of",
      +  "as_of_date",
      +  "currencies",
      +  "customer_ids",
      +  "sums",
      +  "unattributed_count",
      +  "unknown_payment_status_count",
      +  "no_currency_count",
      +  "no_balance_count",
      +  "completeness",
      +  "outstanding_payment_unknown_count",
      +  "party_scope",
      +  "partial",
      +  "rule",
      +  "success"
      +]
  3. 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"
      +}
  4. 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"
      +}
  5. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources