Skip to main content
Glama

wariwari

Get spending stats

get_group_stats
Read-only

Use this for spending totals, per-category and per-member breakdowns, the largest expenses and spending over time. Amounts are minor units in the group currency.

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": {
      "groupToken": "<groupToken>"
    },
    "name": "get_group_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoOnly expenses on this ISO date.
weekNoFilter to a Monday-start week containing the supplied ISO date.
monthNoFilter to a single month, as `YYYY-MM`.
dateRangeNoThe period to count, relative to today in Japan. Defaults to `all_time`.
groupTokenYesThe group's token, from `listGroups` or `listSearchResults`.
categoryTokenNoOnly expenses filed under this group category.
participantTokenNoOnly expenses this participant paid for or owes a share of.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / date / description
      Added value: +"Only expenses on this ISO date."
    • addedInput schema / properties / dateRange / description
      Added value: +"The period to count, relative to today in Japan. Defaults to `all_time`."
  2. Changed7 schema fields changed
    • changedInput schema / $defs / StatsDateRange / description
      Previous value: -"Statistics window. Unknown values fall back to `all_time`."New value: +"Statistics window."
    • changedInput schema / $defs / Token / description
      Previous value: -"Resource token. 24 characters of base58 (`SecureRandom.base58(24)` —\nthe alphabet excludes the visually-confusable `0`, `O`, `I`, `l`).\nTokens are stable across edits. Most public resources receive a\nserver-generated token on creation; group creation may also accept\nclient-supplied participant tokens for offline/import flows.\n"New value: +"Resource token: 24 base58 characters (the alphabet leaves out the\nlook-alikes `0`, `O`, `I` and `l`). A token never changes. The server\ngenerates one when a create sends none; a client may choose its own for a\ntransaction, participant, category or recurring expense, so a write queued\noffline already knows the token it will have.\n"
    • removedInput schema / properties / category
      Removed value: -{
      -  "$ref": "#/$defs/Token",
      -  "description": "Only expenses filed under this group category."
      -}
    • addedInput schema / properties / categoryToken
      Added value: +{
      +  "$ref": "#/$defs/Token",
      +  "description": "Only expenses filed under this group category."
      +}
    • addedInput schema / properties / groupToken / description
      Added value: +"The group's token, from `listGroups` or `listSearchResults`."
    • removedInput schema / properties / participant
      Removed value: -{
      -  "$ref": "#/$defs/Token",
      -  "description": "Only expenses this participant paid for or owes a share of."
      -}
    • addedInput schema / properties / participantToken
      Added value: +{
      +  "$ref": "#/$defs/Token",
      +  "description": "Only expenses this participant paid for or owes a share of."
      +}
  3. First observed

TDQS

A3.7/5.0
Behavior4/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 safety is covered. The description adds genuinely new behavior: no output schema exists, and it discloses that the payload contains totals, category/member breakdowns, largest expenses and a time series, plus the units convention (minor units in the group currency) — a detail an agent could otherwise get wrong by orders of magnitude.

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, both load-bearing: the first enumerates what the tool returns, the second states the amount encoding. No filler, no restatement of the title, and the most important framing is front-loaded.

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?

For a 7-parameter aggregation tool with no output schema, the description reasonably covers output content and units. However, the schema exposes four overlapping time selectors (date, week, month, dateRange) and the description says nothing about how they interact, which is the main thing an agent could get wrong when calling it.

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 every parameter including date, week, month, dateRange, categoryToken and participantToken is already documented in the input schema, which sets the baseline at 3. The description only implicitly maps 'per-category'/'per-member' onto the categoryToken/participantToken filters and adds nothing about filter precedence or compatibility.

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 the concrete outputs of a stats/aggregation read: spending totals, per-category and per-member breakdowns, largest expenses, and spending over time. That is enough to tell it apart from detail-oriented siblings like get_expense_history or get_member_balance, though it never explicitly contrasts itself with them.

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?

"Use this for spending totals, per-category and per-member breakdowns..." gives a clear positive use case, so an agent knows when to reach for it. There is no when-not guidance, no mention of alternatives such as get_expense_history for line-item detail, and no note about whether the overlapping date filters are meant to be combined.

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.

Resources