Add a card
add_cardAdds a card the user holds to their wallet by its id from search_cards, creating the wallet if there isn't one. The reply says what the card still needs (category picks, memberships, activations); ask the user about those. Stores only the card's product id and settings, never card numbers. It uses the user's hosted earnrate wallet, not a wallet file on their computer.
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": {
"cardId": "<cardId>"
},
"name": "add_card"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| added | No | Leave this out: adding a card saves today. earnrate.dev gives it when putting back a card it removed. | |
| bonus | No | A welcome bonus the user is working toward, so purchases recorded on this card count toward it and answers can favor it. Ask when they opened the account; spending needed and the deadline default to the card's published offer. null stops tracking it. | |
| picks | No | For cards where the cardholder picks bonus categories: choice id → option ids, from search_cards, e.g. {"five-percent": ["tv-internet-streaming", "fast-food"]}. Saved for the current period; [] clears a choice's picks. Ask the user; don't guess. | |
| cardId | Yes | The card id from search_cards, e.g. chase-sapphire-preferred. | |
| opened | No | Optional: the day the account opened, YYYY-MM-DD. Only for cards with a first-year rate (search_cards lists it), which applies only while a purchase falls in the window; without a date the card is ranked at its standard rates. Ask the user; never guess or assume a card is new. null removes it. | |
| capSpent | No | Dollars already spent this period on a capped bonus, for a card the user starts tracking partway through: cap key (as list_wallet shows it) → dollars, e.g. {"five-percent-quarterly": 400}. Ask; recorded purchases add to it from then on. | |
| enrolled | No | Statement credit ids the user has enrolled in with the issuer, or, for a credit that needs no enrolling, says they use, and free night ids they say they use (search_cards and list_wallet list each card's credits and free nights, e.g. "lululemon" on Amex Platinum, "anniversary-night" on IHG Premier). A credit that needs enrolling counts in answers only once it's here, and any credit or free night counts against the annual fee only once it's here (or, for a credit, has been used). Replaces the current list. Ask; never assume. | |
| activated | No | Rule ids the user has activated with the issuer, such as rotating categories. Replaces the current list. | |
| creditUsed | No | Dollars of a statement credit already received this period: credit id → dollars, e.g. {"lululemon": 40}. Ask; recorded purchases add to it from then on. | |
| anniversary | No | The account's anniversary as MM-DD: for cards whose cap resets on it, and for a fee card's renewal check (whether it still pays for itself before the fee comes due). Optional; the opening date stands in. Ask; don't guess. | |
| nightValues | No | What a yearly free night is worth to the user, in dollars, only if they say: free night id → dollars, e.g. {"anniversary-night": 300}. The night then counts at that instead of its point cap, and a night with no point cap counts only this way. Setting one marks the night used, even when enrolled in the same call leaves it out (only skippedCredits naming it says otherwise). null clears it; other nights keep theirs. | |
| bonusReceived | No | The month the welcome bonus posted, YYYY-MM, or "none" if the card never paid one, only if the user says. Issuers count repeat-bonus waits from it. null forgets it. | |
| checkoutLabel | No | How the card appears at checkout or in a browser wallet, e.g. "Amex Gold". Optional; null goes back to the card's own name. | |
| milestoneSpent | No | Dollars already spent on the card this year, for its spend bonuses (bonuses after a yearly spending total, as search_cards lists them): milestone id → dollars, e.g. {"spend-15k": 9000}. Every purchase on the card counts, so give each milestone the same total. Ask; recorded purchases add to it from then on. | |
| skippedCredits | No | Statement credit and free night ids the user doesn't use, e.g. ["dunkin"] on Amex Gold. They're left out of picks, the to-do list and the annual-fee math; every other credit or free night on the card counts against its fee once it's in enrolled (or, for a credit that needs no enrolling, has been used). Replaces the current list; [] counts them all again. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | Yes | ||
| cardIds | Yes | ||
| created | Yes | ||
| message | Yes | ||
| memberships | Yes |