Skip to main content
Glama
agent-wallet-advisor

agent-wallet-advisor

by vdelengov

best_card

Compares card reward rates, point values, caps, and promotions to recommend which card to use for a purchase before paying.

Instructions

Pick the card that earns the most rewards for a purchase. Call this before paying.

Args:
    merchant: Merchant name, e.g. "Whole Foods".
    category: One of dining, groceries, travel, gas, online_shopping, streaming,
        drugstores, entertainment, transit, other. If unknown or empty, the category
        is guessed from the merchant and the result says so.
    amount: Purchase amount in US dollars.
    wallet: Card names the user holds (see list_cards). Omit to compare all cards.
    point_values: Optional cents-per-point the user assigns to a points program, e.g.
        {"amex_membership_rewards": 1.8}. Keys: chase_ultimate_rewards,
        amex_membership_rewards, citi_thankyou. Defaults are 1.0. The ranking can
        change with these values, and the result says where the break-even is.
    stale_after_days: Optional age in days after which card data counts as stale
        (default 90). A rule is also stale once its valid_until has passed. The best and
        runner-up cards report data_as_of, data_age_days, stale and stale_reason.
    ending_soon_days: Optional window in days (default 30). If the rule behind the best or
        runner-up card ends within it, the result lists it under ending_soon.
    `warning` is set when either recommended card is stale or its rule ends soon. Expired
    and not-yet-started rules are skipped automatically; `rule` on each card shows which
    rule (promotion, category or base rate) set the rate.

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": {
      "merchant": "<merchant>",
      "category": "<category>",
      "amount": "<amount>"
    },
    "name": "best_card"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYes
walletNo
categoryYes
merchantYes
point_valuesNo
ending_soon_daysNo
stale_after_daysNo

Output Schema

NameRequiredDescriptionDefault
bestYes
notesYes
amountYes
warningNo
categoryYes
merchantYes
runner_upYes
ending_soonYes
explanationYes
category_guessedYes
ending_soon_daysNo
stale_after_daysNo
point_values_usedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it explains that category may be auto-guessed and flagged, that expired/not-yet-started rules are skipped, that stale data triggers warning and stale_reason, that ranking shifts with point_values and reports break-even, and that ending_soon fires within a window. That is real behavioral disclosure, not a restatement of the name.

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?

The purpose sentence is front-loaded and the args block is scannable with one concern per parameter. It runs slightly long and some result-field explanation (data_as_of, stale_reason, rule) is redundant with the output schema, but no sentence is wasted.

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?

For a 7-parameter, no-annotation tool, this covers the full decision surface: inputs, defaults, fallback guessing, staleness policy, warning semantics, and ranking sensitivity. The output schema handles return shape, so the extra result-field notes are a bonus rather than a gap-filler.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate, and it does for all seven parameters: category enumerates its allowed values and the fallback behavior, point_values gives a concrete example plus the valid keys and the 1.0 default, and stale_after_days/ending_soon_days state their defaults and effects. An agent could fill this schema correctly from the description alone.

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?

"Pick the card that earns the most rewards for a purchase" states a specific verb (pick/rank) and resource (card, per purchase), which is unmistakably different from list_cards or explain_rule. The follow-on "Call this before paying" anchors the decision point the tool serves.

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?

"Call this before paying" gives a concrete trigger, and the wallet arg routes the agent to list_cards for card names. It stops short of an explicit when-not or a direct comparison to explain_rule, so the agent must infer that this is the ranking step versus the rule-inspection step.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools