Skip to main content
Glama
bankstatemently

bankstatemently

Official

Compare Transaction Groups

compare
Read-only

Contrast two filtered transaction sets side by side by sum, average, count, max, or min to reveal spending or income differences across categories, months, accounts, or products.

Instructions

Side-by-side metric comparison for two filtered groups of transactions (e.g. one category vs another, one month vs another). 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).
metricYesMetric for both groups.
filterAYesSubset of transactions to operate on. All fields are optional and combined with AND logic.
filterBYesSubset of transactions to operate on. All fields are optional and combined with AND logic.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv2.0.0
    • addedInput schema / properties / filterA / additionalProperties
      Added value: +false
    • removedInput schema / properties / filterA / properties / accounts
      Removed value: -{
      -  "description": "Account number slugs to include.",
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • addedInput schema / properties / filterB / additionalProperties
      Added value: +false
    • removedInput schema / properties / filterB / 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.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered elsewhere. The description usefully adds the default-scope behavior (all completed statements unless narrowed), but says nothing about currency handling, how groups of differing size/period are normalized, or rate/size limits on the comparison.

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: the comparison purpose and examples come first, the scope default/narrowing second. No filler and nothing buried.

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 no output schema, the description should carry more of the return-shape burden — it implies a side-by-side metric result but never states what is returned (two values, a delta, sample sizes). For a nested-scope, 3-required-parameter analytical tool this leaves a real gap, though the core invocation is unambiguous.

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 filterA/filterB field semantics, scope.accounts chips, dateRange and the metric enum are all already documented in the schema. The description adds only the framing that filterA and filterB are the two compared groups and that scope narrows WHO×WHEN, which is marginal added meaning.

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?

Names a specific verb+resource ('side-by-side metric comparison for two filtered groups of transactions') and anchors it with concrete examples ('one category vs another, one month vs another'). It is readily distinguishable from aggregate/group_by/top_n in spirit, but never names a sibling to draw the boundary explicitly.

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?

Explains the default behavior ('Scope defaults to all your completed statements') and when to supply 'scope' to narrow. However, it gives no guidance on when to prefer this over the closely related analytical siblings (aggregate, group_by, top_n) that could plausibly answer similar questions.

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