Skip to main content
Glama
bankstatemently

bankstatemently

Official

Group Transactions

group_by
Read-only

Group bank transactions by month, category, merchant, account, or currency and calculate sum, average, count, max, or min per group. Scope by accounts/products and date range.

Instructions

Group transactions by a dimension (month/category/merchant/account/currency) and apply a metric to each group. Results are per-currency. Scope defaults to all your completed statements; pass "scope" to narrow to specific accounts/products and/or a date range.

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.
metricYesMetric per group.
dimensionYesGrouping dimension.

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

A3.7/5.0
Behavior4/5

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

Annotations already establish read-only, non-destructive behavior. Beyond that, the description adds genuinely useful traits: results are returned per-currency (not merged), and the default scope spans all completed statements unless narrowed. These are non-obvious behaviors not derivable from annotations or schema.

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?

Two tight sentences, front-loaded with the core operation followed by the two non-obvious behaviors (per-currency results, default scope). No padding or repetition.

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

Completeness3/5

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

With nested scope/filter objects, 4 parameters, and no output schema, the description should carry more weight on result shape. It notes per-currency results but never explains what the metric is applied to (e.g., transaction amount) or how groups are returned, leaving a meaningful gap for an output-less tool.

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

Parameters3/5

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

Schema description coverage is 100%, so dimension, metric, scope, and filter are already fully documented, including the enum values. The description restates the dimension list and the scope default but adds no syntax or semantics beyond the schema, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Group transactions') and enumerates the five grouping dimensions plus the metric concept, so the operation is unambiguous. It does not, however, distinguish itself from closely related siblings like aggregate, top_n, or time_series, which an agent must infer.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explains the default scope (all completed statements) and how to narrow it, which is useful operational context. But it never says when to prefer this tool over the many sibling aggregation tools (aggregate, top_n, compare, time_series), and gives no exclusions or prerequisites.

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