Skip to main content
Glama
bankstatemently

bankstatemently

Official

Top N Transactions

top_n
Read-only

Returns the top N groups by a selected metric, showing per-currency results for monetary values. Supports optional filters for accounts, products, and date ranges to scope the analysis.

Instructions

Return the top N groups ranked by metric (descending), per-currency for monetary metrics. 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
nYesNumber of top groups to return.
scopeNoOptional 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).
filterNoSubset of transactions to operate on. All fields are optional and combined with AND logic.
metricYesMetric to rank by.
dimensionYesGrouping dimension.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds valuable behavioral details: descending order, per-currency handling for monetary metrics, and the default scope. These go beyond what annotations provide and help the agent understand the tool's output semantics.

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 sentences with no filler. The core purpose is front-loaded, followed by the per-currency nuance and the default scope behavior. Every word earns its place, and the structure is highly efficient.

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?

Given the tool's complexity (5 parameters, nested objects, enums) and the absence of an output schema, the description is concise but covers the key behavioral nuances: default scope and per-currency handling. The schema fills in parameter details, so the description is sufficient for an agent to call the tool correctly, though it could mention how multiple currencies interact in non-monetary metrics.

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 coverage is 100%, meaning all parameters already have detailed descriptions in the schema. The description mentions 'scope' but only restates what the schema says about narrowing by accounts/products or date range. It adds no new semantic meaning beyond the schema, so the baseline of 3 is appropriate.

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 clearly states a specific verb and resource: 'Return the top N groups ranked by metric (descending)'. It specifies the grouping concept and adds a distinctive per-currency behavior for monetary metrics. This distinguishes it from siblings like aggregate or group_by, which focus on aggregation without the top-N ranking emphasis.

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?

The description gives a clear default scope ('all your completed statements') and how to narrow it via the 'scope' parameter. However, it does not explicitly compare this tool to alternatives like time_series or compare, nor does it state when to prefer top_n over them. The intended use case (top N ranking) is implied but not contrasted with siblings.

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