Skip to main content
Glama
bankstatemently

bankstatemently

Official

Aggregate Transactions

aggregate
Read-only

Compute sum, average, count, max, or min for filtered transactions across converted bank statements, scoped by accounts, products, or date range. Results are returned per currency.

Instructions

Compute a single metric (sum/average/count/max/min) over a filtered set of transactions across your converted statements. Results are per-currency — never sum across currencies yourself. Scope defaults to all your completed statements; pass "scope" to narrow to specific accounts/products and/or a date range. For "how many credits do I have" / processing quota / remaining pages, use get_credits instead — that is not a transaction.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeNoOptional structural scope (WHO × WHEN). Omit to search across all your completed statements. "accounts" is a list of account/product chips ({ kind: "account" | "product", id }, the id of an account descriptor or product returned by a tool); "dateRange" bounds by transaction date (YYYY-MM-DD).
filterNoSubset of transactions to operate on. All fields are optional and combined with AND logic.
metricYesAggregation metric.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv2.0.0
    • addedInput schema / properties / filter / additionalProperties
      Added value: +false
    • removedInput schema / properties / filter / properties / accounts
      Removed value: -{
      -  "description": "Account number slugs to include.",
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • changedInput schema / properties / scope / description
      Previous value: -"Optional structural scope (WHO × WHEN). Omit to search across all your completed statements. \"accounts\" is a list of account/product chips (kind + identityKey); \"dateRange\" bounds by transaction date (YYYY-MM-DD)."New value: +"Optional structural scope (WHO × WHEN). Omit to search across all your completed statements. \"accounts\" is a list of account/product chips ({ kind: \"account\" | \"product\", id }, the id of an account descriptor or product returned by a tool); \"dateRange\" bounds by transaction date (YYYY-MM-DD)."
    • changedInput schema / properties / scope / properties / accounts / description
      Previous value: -"Account/product chips (kind + identityKey) to scope to. Empty = all accounts."New value: +"Account/product id chips (kind + id) to scope to. Empty = all accounts."
    • changedInput schema / properties / scope / properties / accounts / items / oneOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "anchorContentHash": {
      -        "description": "Document-anchored lookup when present (results page); omit for a user-scoped lookup (workspace surfaces).",
      -        "type": "string"
      -      },
      -      "identityKey": {
      -        "description": "Canonical account identity key (accountIdentityKey), never a raw DB UUID.",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "kind": {
      -        "const": "account",
      -        "description": "This chip addresses a single account.",
      -        "type": "string"
      -      },
      -      "label": {
      -        "description": "Display label for this chip.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "identityKey"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "identityKey": {
      -        "description": "Product slug.",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "kind": {
      -        "const": "product",
      -        "description": "This chip addresses a product and expands to its child accounts.",
      -        "type": "string"
      -      },
      -      "label": {
      -        "description": "Display label for this chip.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "identityKey"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "id": {
      +        "description": "The account id: the `id` of an account descriptor returned by a tool, or of a statement tool `accounts[]` entry.",
      +        "format": "uuid",
      +        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +        "type": "string"
      +      },
      +      "kind": {
      +        "const": "account",
      +        "description": "This chip addresses a single account.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "id"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "id": {
      +        "description": "The product id: the `id` of a product returned by a statement tool (`get_statement` / `convert_statement`, `products[].id`).",
      +        "format": "uuid",
      +        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +        "type": "string"
      +      },
      +      "kind": {
      +        "const": "product",
      +        "description": "This chip addresses a product and expands to its child accounts.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "id"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/destructiveHint=false, so safety is covered. The description adds real behavioral context the annotations cannot: results are per-currency and must never be summed across currencies, and the default scope is all completed statements. It stops short of describing result shape or pagination.

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

Conciseness5/5

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

Three sentences, front-loaded with what is computed, followed by the per-currency caveat and then scope semantics and the get_credits routing. No sentence is filler and the most failure-prone caveat is placed early.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-param tool with nested scope/filter objects and no output schema, the description covers metric choice, scope defaults, filter purpose (via the schema) and the per-currency result contract. It does not describe the returned shape or how per-currency groups are keyed, which is a minor residual gap given no output schema exists.

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 description coverage is 100%, so the baseline is 3; the description still adds meaning beyond the schema by characterizing scope as 'WHO × WHEN', stating that omitting it searches all completed statements, and noting the accounts chips are account/product ids returned by other tools. The per-currency constraint also qualifies how metric results should be read.

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?

States a specific verb (compute) plus the exact metric set (sum/average/count/max/min) over a named resource (transactions across converted statements). The 'single metric' phrasing implicitly separates it from group_by, top_n, time_series and compare, which are the aggregation siblings that would otherwise be ambiguous.

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?

Explicitly routes the agent away for one class of question ('how many credits do I have' / quota / remaining pages → use get_credits), and states the default scope plus how to narrow it. It gives clear context but does not explicitly distinguish itself from sibling aggregators like group_by or top_n, leaving that to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.