Skip to main content
Glama

Record a purchase

record_purchase

Records a purchase the user has already made, so spending caps and welcome-bonus progress stay accurate for future recommendations. It updates the user's saved wallet. Only call it after the purchase has happened, and only once per purchase: calling it twice counts the spend twice. Purchases with no cap and no open welcome bonus are acknowledged and nothing is written.

Input Schema

NameRequiredDescriptionDefault
dateNoPurchase date, YYYY-MM-DD. Defaults to today.
amountYesAmount spent in US dollars.
cardIdYesThe card used, as a cardId from list_wallet or best_card_for_purchase.
channelNoHow the purchase is made. Omit if unknown; the answer says what it assumed.
categoryNoOnly for a merchant earnrate may not know, and only if you're confident what kind of business it is: its spending category, e.g. grocery.supermarket for a supermarket, dining for a restaurant, gas for a gas station. Ignored when earnrate knows the merchant. Leave it out if unsure. Categories: dining (Restaurants), dining.fast_food (Fast food), grocery.supermarket (Supermarkets), grocery.online (Online grocery and delivery), superstore (Superstores), warehouse_club (Warehouse clubs), convenience_store (Convenience stores), gas (Gas stations), gas.grocery_store (Gas at grocery stores), gas.superstore (Gas at superstores and warehouse clubs), ev_charging (EV charging), transit (Transit), transit.rideshare (Rideshare and taxis), travel (Travel), travel.flights (Flights), travel.hotels (Hotels), travel.car_rental (Car rental), travel.cruise (Cruises), streaming (Streaming services), tv_internet (TV and internet service), phone (Cell phone service), utilities (Home utilities), drugstore (Drugstores and pharmacies), movie_theaters (Movie theaters), entertainment (Live entertainment and events), fitness (Gyms and fitness), department_store (Department stores), clothing (Clothing stores), electronics (Electronics stores), sporting_goods (Sporting goods stores), home_improvement (Home improvement), furniture (Furniture stores), online_retail (Online retail), office_supply (Office supply stores), shipping (Shipping and couriers), online_advertising (Social media and search advertising), other (Everything else).
merchantYesMerchant name or web address as the user would say it or see it, e.g. "Whole Foods" or "delta.com".

Output Schema

NameRequiredDescriptionDefault
bonusYes
bookingYes
messageYes
recordedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / category / description
      Previous value: -"Only for a merchant earnrate may not know, and only if you're confident what kind of business it is: its spending category, e.g. grocery.supermarket for a supermarket, dining for a restaurant, gas for a gas station. Ignored when earnrate knows the merchant. Leave it out if unsure. Categories: dining (Restaurants), dining.fast_food (Fast food), grocery (Grocery), grocery.supermarket (Supermarkets), grocery.online (Online grocery and delivery), superstore (Superstores), warehouse_club (Warehouse clubs), convenience_store (Convenience stores), gas (Gas stations), gas.grocery_store (Gas at grocery stores), gas.superstore (Gas at superstores and warehouse clubs), ev_charging (EV charging), transit (Transit), transit.rideshare (Rideshare and taxis), travel (Travel), travel.flights (Flights), travel.hotels (Hotels), travel.car_rental (Car rental), travel.cruise (Cruises), streaming (Streaming services), tv_internet (TV and internet service), phone (Cell phone service), utilities (Home utilities), drugstore (Drugstores and pharmacies), movie_theaters (Movie theaters), entertainment (Live entertainment and events), fitness (Gyms and fitness), department_store (Department stores), clothing (Clothing stores), electronics (Electronics stores), sporting_goods (Sporting goods stores), home_improvement (Home improvement), furniture (Furniture stores), online_retail (Online retail), office_supply (Office supply stores), shipping (Shipping and couriers), online_advertising (Social media and search advertising), other (Everything else)."New value: +"Only for a merchant earnrate may not know, and only if you're confident what kind of business it is: its spending category, e.g. grocery.supermarket for a supermarket, dining for a restaurant, gas for a gas station. Ignored when earnrate knows the merchant. Leave it out if unsure. Categories: dining (Restaurants), dining.fast_food (Fast food), grocery.supermarket (Supermarkets), grocery.online (Online grocery and delivery), superstore (Superstores), warehouse_club (Warehouse clubs), convenience_store (Convenience stores), gas (Gas stations), gas.grocery_store (Gas at grocery stores), gas.superstore (Gas at superstores and warehouse clubs), ev_charging (EV charging), transit (Transit), transit.rideshare (Rideshare and taxis), travel (Travel), travel.flights (Flights), travel.hotels (Hotels), travel.car_rental (Car rental), travel.cruise (Cruises), streaming (Streaming services), tv_internet (TV and internet service), phone (Cell phone service), utilities (Home utilities), drugstore (Drugstores and pharmacies), movie_theaters (Movie theaters), entertainment (Live entertainment and events), fitness (Gyms and fitness), department_store (Department stores), clothing (Clothing stores), electronics (Electronics stores), sporting_goods (Sporting goods stores), home_improvement (Home improvement), furniture (Furniture stores), online_retail (Online retail), office_supply (Office supply stores), shipping (Shipping and couriers), online_advertising (Social media and search advertising), other (Everything else)."
    • changedInput schema / properties / category / enum
      Previous value: -[
      -  "dining",
      -  "dining.fast_food",
      -  "grocery",
      -  "grocery.supermarket",
      -  "grocery.online",
      -  "superstore",
      -  "warehouse_club",
      -  "convenience_store",
      -  "gas",
      -  "gas.grocery_store",
      -  "gas.superstore",
      -  "ev_charging",
      -  "transit",
      -  "transit.rideshare",
      -  "travel",
      -  "travel.flights",
      -  "travel.hotels",
      -  "travel.car_rental",
      -  "travel.cruise",
      -  "streaming",
      -  "tv_internet",
      -  "phone",
      -  "utilities",
      -  "drugstore",
      -  "movie_theaters",
      -  "entertainment",
      -  "fitness",
      -  "department_store",
      -  "clothing",
      -  "electronics",
      -  "sporting_goods",
      -  "home_improvement",
      -  "furniture",
      -  "online_retail",
      -  "office_supply",
      -  "shipping",
      -  "online_advertising",
      -  "other"
      -]New value: +[
      +  "dining",
      +  "dining.fast_food",
      +  "grocery.supermarket",
      +  "grocery.online",
      +  "superstore",
      +  "warehouse_club",
      +  "convenience_store",
      +  "gas",
      +  "gas.grocery_store",
      +  "gas.superstore",
      +  "ev_charging",
      +  "transit",
      +  "transit.rideshare",
      +  "travel",
      +  "travel.flights",
      +  "travel.hotels",
      +  "travel.car_rental",
      +  "travel.cruise",
      +  "streaming",
      +  "tv_internet",
      +  "phone",
      +  "utilities",
      +  "drugstore",
      +  "movie_theaters",
      +  "entertainment",
      +  "fitness",
      +  "department_store",
      +  "clothing",
      +  "electronics",
      +  "sporting_goods",
      +  "home_improvement",
      +  "furniture",
      +  "online_retail",
      +  "office_supply",
      +  "shipping",
      +  "online_advertising",
      +  "other"
      +]
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare a non-read-only, non-idempotent write; the description then adds the crucial consequences: double counting on repeat calls, mutation of the saved wallet, and an acknowledged no-write path when neither cap nor welcome bonus applies. That is context the structured fields cannot convey.

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?

Four short sentences, front-loaded with purpose and immediately followed by the two operational constraints. Every clause carries information an agent needs; no filler.

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?

Output schema covers return values, the schema covers all six parameters, and the description covers the behavioral risks (duplicate spend, silent no-op). Nothing an agent needs to call this correctly is missing.

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% and each parameter (including the date default, channel omission, and category enum guidance) is documented in the schema itself. The description adds no parameter-level detail beyond the duplicate-call warning, so baseline 3 applies.

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?

States a specific verb and resource ('Records a purchase') plus the downstream effect ('spending caps and welcome-bonus progress stay accurate'). The phrase 'a purchase the user has already made' implicitly separates it from simulate_spending, so an agent can pick correctly without opening schemas.

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?

Gives an explicit precondition ('only call it after the purchase has happened') and an explicit prohibition ('only once per purchase'), plus a no-op case. It does not name simulate_spending as the alternative for hypothetical purchases, so the routing is inferred rather than stated.

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.