Skip to main content
Glama

Where spend went

wallet_migration
Read-only

Where a cohort's spend went after it stopped

The merchants that gained spend from accounts that stopped using a merchant or group: "people who played the lottery in June and stopped by September, where did that money go?" Name the audience by merchant or group, with two windows of one month each.

stopped_accounts were active in before and not in after. still_active_accounts are those seen anywhere in after; the rest may simply have left the data, so quote both.

Rows are ranked by excess_change_cents: these accounts' spend change at that merchant (change_cents) beyond what the merchant's own change across all accounts (merchant_change_pct) predicts from their earlier spend there. A merchant with no earlier spend across all accounts, or that grew more than 5x, is new to the data or seasonal: it is left out of the ranking, and left_out names those that would have ranked. Mention them. When ranked_by is change_cents, the comparison couldn't be read and rows rank by raw change. It shows where their spend rose, not that it came from the merchant they left. Accounts are not people.

A merchant or cohort below 10,000 transactions or 1,000 accounts is left out; a cohort below either comes back suppressed, with no reason given.

Talk to the user in plain words: no tool, parameter or field names. Say "the American Spend model", never "panel" or a data source.

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": {
      "before_start": "<before_start>",
      "before_end": "<before_end>",
      "after_start": "<after_start>",
      "after_end": "<after_end>"
    },
    "name": "wallet_migration"
  }
}

Input Schema

NameRequiredDescriptionDefault
groupNoThe audience by merchant group, slug or id, such as `lotteries` or `sportsbooks`. Wins over `merchant`.
limitNoMerchants to return, 1 to 50.
merchantNoThe audience by brand name.
after_endYesLast day of the later window.
before_endYesLast day of the earlier window.
after_startYesFirst day of the later window.
merchant_idNoThe audience by canonical merchant UUIDs. Comma-separated, max 50. Wins over `group` and `merchant`.
before_startYesFirst day of the earlier window.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the readOnly/non-destructive annotations, the description discloses substantial behavior: the excess-change ranking method, that new or 5x-growth merchants are dropped from ranking and surfaced in `left_out`, the fallback when `ranked_by` is `change_cents`, and suppression thresholds (10,000 transactions / 1,000 accounts) returning `suppressed` with no reason. It also flags that accounts are not people. This is exactly the kind of context structured fields cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and the methodology paragraphs are dense but ordered. However, the opening fragment is awkwardly truncated, and the closing instruction about plain wording and never saying 'panel' is style guidance that consumes space without helping tool selection. Some sentences pack multiple caveats that could be tightened.

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

Completeness5/5

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

With no output schema and eight parameters, the description compensates by naming and explaining the returned fields (`excess_change_cents`, `change_cents`, `merchant_change_pct`, `left_out`, `ranked_by`, `suppressed`) and their caveats. An agent has everything needed to call it and to report results honestly.

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

Parameters4/5

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

Schema description coverage is 100%, so the schema already defines each window date and the audience selectors. The description nonetheless adds real meaning: `stopped_accounts` are active in `before` but not in `after`, and `still_active_accounts` are those seen anywhere in `after`, which clarifies what the before/after windows actually compute. That is value above the schema baseline of 3.

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 states a specific analysis: merchants that gained spend from accounts that stopped using a merchant or group, with the illustrative question 'people who played the lottery in June and stopped by September, where did that money go?' It clearly conveys the verb (find where spend went) and the resource (cohort wallet shifts), and the concept is distinct from siblings like query_spend or cohort_overlap. It does not explicitly name a sibling it is not, so it falls short of 5.

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 worked example of naming an audience by merchant or group with two one-month windows tells an agent exactly the shape of a valid use. It also warns that results show where spend rose, not that it came from the merchant left, which governs interpretation. There is no explicit when-not or named alternative tool, so it is clear context without exclusions.

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.