Skip to main content
Glama

get_cumulative_stats

Read-only

Get running totals of expenses, income or savings by month for a period, next to the period of the same length right before it, plus the percent change, in the base currency. Use it for "am I spending more than last quarter so far".

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "from": "<from>",
      "to": "<to>",
      "metric": "<metric>"
    },
    "name": "get_cumulative_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesPeriod end (YYYY-MM-DD, inclusive)
fromYesPeriod start (YYYY-MM-DD, inclusive)
metricYesWhat to accumulate: expenses, income or savings
tagIdsNoOnly transactions with these tags
payeeIdsNoOnly these payees
accountIdNoOnly this account
accountIdsNoOnly these accounts (wins over accountId)
categoryIdsNoOnly these categories (a parent includes its subcategories)
excludedTagIdsNoLeave out transactions with these tags
excludedPayeeIdsNoLeave out these payees
excludedCategoryIdsNoLeave out these categories (a parent hides its subcategories)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior3/5

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

readOnlyHint=true already establishes this is a safe read. The description adds genuine context beyond the annotation: results are normalized to base currency, the comparison window is auto-derived as the same length immediately before, and a percent change is computed. It does not address how incomplete current periods are handled or whether zero-baseline divisions are guarded, which matters for a comparison tool.

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, zero waste. The core mechanics are front-loaded and the second sentence is a compact, quotable usage scenario that earns its place.

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 an 11-parameter analytics tool with no output schema, the description conveys the shape of the return (per-month totals, matching prior period, percent delta, base currency) well enough to call it confidently. The only real gap is that the rich filter set is left entirely to the schema.

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 all 11 parameters including the nine filter arrays are already documented with their precedence and subcategory behavior. The description clarifies the accumulation metric choices and the monthly bucketing implied by 'running totals', but adds nothing about the tag/payee/category/account filters. Baseline 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?

The description names a specific verb (get) and a precisely characterized resource: monthly running totals of expenses/income/savings for a period, juxtaposed against the immediately preceding equal-length period, with percent change in base currency. That combination is distinctive enough to separate it from get_expenses_for_period or get_cash_flow, though it never names a sibling explicitly.

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?

The quoted example ("am I spending more than last quarter so far") gives a concrete trigger scenario that maps cleanly onto the period-vs-prior-period semantics. It stops short of exclusions or naming the alternative tool to use for absolute totals without comparison.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.