Skip to main content
Glama

Category summary

category_summary
Read-only

Every category's spend beside its public benchmarks

The window is at most 366 days. location is a metro name such as Pittsburgh, not City, ST. Per category, among cardholders in geo over the window (purchase-only): spend_cents (raw, or the US-adult estimate in population mode), share_of_spend of all categories, growth_pct against the same window a year earlier and real_growth_pct net of the mapped CPI's price change; cpi (the crosswalk's CPI item at the most specific published area, and its change), marts (Census monthly retail sales growth for the crosswalk's NAICS code over the window's complete months — national only; say restaurants' marts.note beside it) and ces (the Consumer Expenditure Survey's share of total expenditure for the mapped line, newest year, the geo's region or the nation, beside the model's share). Every mapping carries its crosswalk fit.

The two shares have different denominators — the survey's includes housing, insurance and everything not bought by card — so compare their ranking and drift, not their levels. A year-over-year figure needs both years in the model; in population mode every month of both years needs weights (from 2025-09), so growth is null for a window that starts before 2026-09. If growth is null, report the raw series and say so rather than inventing a year-over-year figure.

Population mode also withholds growth for restaurants: prior_spend_cents, growth_pct and real_growth_pct are null and growth_withheld says why. Model restaurant spend is mostly chain fast food and fast casual, so its weighted growth doesn't estimate the food-service sector that Census NAICS 722 measures. Raw mode still serves model growth.

Read each category's fit before quoting a public series beside it. A long list keeps its largest categories and says so; pass category for the others.

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": {
      "start_date": "<start_date>",
      "end_date": "<end_date>"
    },
    "name": "category_summary"
  }
}

Input Schema

NameRequiredDescriptionDefault
geoNoCardholder geography — `us` (default), `state:TX` or `cbsa:19100` (code, bucket or name).us
categoryNoOnly these categories (comma-separated). Default every category with spend. Category keys are lower-case and exact: `automotive`, `delivery`, `education`, `entertainment`, `financial_services`, `gifts_donations`, `government`, `grocery`, `healthcare`, `home_services`, `personal_care`, `pets`, `professional_services`, `restaurants`, `retail`, `subscriptions`, `tax_services`, `technology`, `travel`, `utilities`, `uncategorized`, plus older keys the data still carries (list every key with the breakdown, `group_by=category`). Any other name is a 400 `…/problems/category-unknown` whose `candidates` are the closest keys (`Groceries` → `grocery`).
end_dateYesInclusive ISO-8601 date. At most 366 days after `start_date`.
normalizeNo`per_account` adds each category's spend per active card in `geo` (`per_account_cents`) and its change from the same window a year earlier (`per_account_change_pct`): the category's spend over every card in `geo` with a purchase, whatever it bought — the denominator a brand's per-card growth uses. Quote it for a category's growth in a place. Raw in any weighting mode.none
weightingNo`raw` (the default): model volume, `weighted_cents` equals `total_cents`. `population`: the weighted fields reweight the model to the mix of US adults (for shares, comparisons and growth, not market size), with `effective_n`, `low_precision`, `suppressed` and a `weighting` object. A month has weights once it has been raked, from 2025-09 on. `same_account`: growth compares one set of accounts, those with spend in the model in both of two months, chained month by month, so accounts arriving or leaving can't move it. It is turnover-adjusted: each month also carries the merchant's or category's own balance of accounts arriving and leaving (the median over 12 months), which shared accounts alone miss. Levels and shares stay raw. A growth block gains `same_account_change_pct` and `same_account_yoy_pct`, or `same_account_unavailable` saying why not, and a monthly series carries chained dollars in `weighted_cents`. It needs whole, settled calendar months, the newest month waits for the month after it on the default `stable` accounts, and it is in validation (403 `same-account-weighting-forbidden` until open to the key). Omit it to get the response shape callers had before it existed.raw
start_dateYesInclusive ISO-8601 date.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / normalize
      Added value: +{
      +  "default": "none",
      +  "description": "`per_account` adds each category's spend per active card in `geo`\n(`per_account_cents`) and its change from the same window a year\nearlier (`per_account_change_pct`): the category's spend over every\ncard in `geo` with a purchase, whatever it bought — the denominator a\nbrand's per-card growth uses. Quote it for a category's growth in a\nplace. Raw in any weighting mode.",
      +  "enum": [
      +    "none",
      +    "per_account"
      +  ],
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / weighting / description
      Previous value: -"`raw` (the default): model volume, `weighted_cents` equals\n`total_cents`. `population`: the weighted fields reweight the model\nto the mix of US adults (for shares, comparisons and growth, not\nmarket size), with `effective_n`, `low_precision`, `suppressed` and\na `weighting` object. A month has weights once it has been raked,\nfrom 2025-09 on. `same_account`: growth compares one set of accounts,\nthose with spend in the model in both of two months, chained month by\nmonth, so accounts arriving or leaving can't move it. Levels and\nshares stay raw. A growth block gains `same_account_change_pct` and\n`same_account_yoy_pct`, or `same_account_unavailable` saying why not,\nand a monthly series carries chained dollars in `weighted_cents`. It\nneeds whole, settled calendar months, the newest month waits for the\nmonth after it on the default `stable` accounts, and it is in validation (403\n`same-account-weighting-forbidden` until open to the key). Omit it to\nget the response shape callers had before it existed."New value: +"`raw` (the default): model volume, `weighted_cents` equals\n`total_cents`. `population`: the weighted fields reweight the model\nto the mix of US adults (for shares, comparisons and growth, not\nmarket size), with `effective_n`, `low_precision`, `suppressed` and\na `weighting` object. A month has weights once it has been raked,\nfrom 2025-09 on. `same_account`: growth compares one set of accounts,\nthose with spend in the model in both of two months, chained month by\nmonth, so accounts arriving or leaving can't move it. It is\nturnover-adjusted: each month also carries the merchant's or\ncategory's own balance of accounts arriving and leaving (the median\nover 12 months), which shared accounts alone miss. Levels and shares stay raw. A growth block gains `same_account_change_pct` and\n`same_account_yoy_pct`, or `same_account_unavailable` saying why not,\nand a monthly series carries chained dollars in `weighted_cents`. It\nneeds whole, settled calendar months, the newest month waits for the\nmonth after it on the default `stable` accounts, and it is in validation (403\n`same-account-weighting-forbidden` until open to the key). Omit it to\nget the response shape callers had before it existed."
  3. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the read-only, non-destructive, closed-world profile, and the description goes further by disclosing null-growth conditions (both years in the model, weights from 2025-09, null for windows starting before 2026-09), population-mode suppression of restaurant growth with growth_withheld, and the 403 same-account-weighting-forbidden gate. Some of this restates the weighting parameter's own schema text, but the data-availability caveats are genuinely additive.

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 in a single line and the remaining paragraphs are mostly load-bearing caveats, but the block is dense and long, and several points (weight raking dates, same_account behavior) duplicate the schema. The closing instruction about plain-words phrasing is a style directive rather than selection-relevant content and dilutes the definition.

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, the description carries the full burden of explaining return values, and it does so field by field — spend, share, nominal and real growth, CPI crosswalk and fit, Census MARTS, and CES comparison. It also covers list truncation ('a long list keeps its largest categories and says so') and the failure modes, leaving nothing an agent needs in order to call it correctly.

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 coverage is 100%, so the baseline is 3; the description earns an extra point by clarifying that the geography must be a metro name such as Pittsburgh rather than 'City, ST', and by explaining how weighting mode changes which fields are populated. It loses some credit for calling that argument 'location' when the schema parameter is actually `geo`, a naming mismatch that could briefly confuse an agent.

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 opening line plus the field walk-through make it clear this returns per-category spend (spend_cents, share_of_spend, growth_pct, real_growth_pct) alongside public benchmarks (cpi, marts, ces) for a geo and window. The purpose is specific and concrete, but the description never names a sibling tool, so the agent must infer on its own whether category_trends, breakdown, or compare_to_benchmark is the better fit.

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?

There is substantial guidance on how to interpret results — read each mapping's fit before quoting a public series, compare the two shares by ranking and drift rather than level, report the raw series when growth is null. What is missing is tool-selection guidance: no statement of when to use this instead of a per-category trend or a direct benchmark comparison tool, only an oblique 'pass category for the others' that addresses a parameter, not an alternative tool.

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.