Skip to main content
Glama

Best card for a purchase

best_card_for_purchase
Read-only

Which card earns the most rewards for a purchase, and why. With no cards given and no saved wallet, it ranks every card earnrate knows (in allCards): a complete answer for anyone. With cards named in the conversation (cards) or a saved wallet, it picks the best of the user's own: decision.cardId is the pick and decision.checkoutLabel is how the card appears at checkout, with every usable card ranked with reasons, cards the merchant won't take, assumptions, warnings, and when a different point valuation would change the pick. Never needs or returns card numbers.

Input Schema

NameRequiredDescriptionDefault
dateNoPurchase date, YYYY-MM-DD. Defaults to today.
cardsNoCards the user named in this conversation, to answer for just those cards without saving anything. Leave out to use the user's saved wallet if they have one; with neither, the answer covers every card earnrate knows.
amountNoPurchase amount in US dollars. Improves cap math.
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".
membershipsNoMemberships the user has, such as amazon-prime, when they're named in the conversation rather than saved.

Output Schema

NameRequiredDescriptionDefault
bonusYes
notesYes
rankedYes
allCardsYes
decisionYes
excludedYes
merchantYes
warningsYes
assumptionsYes
sensitivityYes

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.3/5.0
Behavior5/5

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

Annotations only declare readOnly/openWorld=false; the description adds what the response actually contains — ranked usable cards with reasons, cards the merchant won't accept, assumptions, warnings, and sensitivity to point valuation. It also states a non-obvious safety property ('Never needs or returns card numbers') that no annotation conveys.

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

Conciseness4/5

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

Front-loaded with the core question, then the two operating modes, then result contents. Dense but every clause carries information; the long second sentence could be split for scanability.

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?

Covers mode selection and output shape, and an output schema plus annotations handle the rest. Minor gap: it doesn't mention what happens when the merchant isn't recognized (the resolve_merchant sibling), though the category param's schema description partly covers this.

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 the schema already explains cards, picks, activated, amount, channel, category, and memberships in detail. The description adds only the cards-vs-wallet fallback framing, which the schema's cards description already states — baseline 3.

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 question it answers ('Which card earns the most rewards for a purchase, and why') plus the concrete output it produces (decision.cardId, decision.checkoutLabel, ranked cards). An agent knows exactly what the tool returns without opening the schema.

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 explicit conditional routing: no cards and no saved wallet means rank every known card, while named cards or a saved wallet means pick among the user's own. It doesn't name sibling alternatives (best_cards_for, cheat_sheet, compare_welcome_offers) that an agent might confuse it with, so it stops short of a 5.

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.