Complete deck on budget
complete_deck_on_budgetHow to finish one deck (id or name) with budget to spend, in currency (default USD): the missing copies bought cheapest first while the budget lasts (buy, with text as "4 Card Name" lines for a shop), the copies that do not fit (over_budget, over_by), and the cards with no price yet (no_price_yet, left out of every total). A price is the cheapest non-foil printing among the priced ones, or the pinned printing's when the list pins one. Each over-budget card carries owned_stand_ins: cards the user owns with copies no deck claims outright, in the deck's colour identity, and cheaper_to_buy: cards whose cheapest price for every copy of the line fits what is left of the budget. With stand_ins_by "rules text" both come from the cards nearest by rules text (a nearer mana value and a more played card first), legal in the format; with "type and mana value" (no list for the card yet) they are mechanical filters only, still legal in the format, and cheaper_to_buy is empty; null for the commander, which gets none. Either way YOU judge whether one does the job. Say proxies beside a stand-in that has any, and name every deck in its shared_with: those copies are already borrowed. A line's claimed_by_other_decks means the user owns copies another deck claims: say so before they buy (claim_from_collection with allow_shared can borrow them). Name the cards in printings_not_compared as possibly cheaper: some of their printings have no price yet, and the nightly price refresh reaches every printing within a week (prices_queued is always 0: this tool queues nothing). Copies the user owns free (claimable) are not missing: run claim_from_collection first. Read-only: it changes nothing and starts no work. Relay rate_missing when present. stand_ins_withheld, when present, means the user's plan has no stand-ins: relay it once, as written.
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": {
"deck": "<deck>",
"budget": "<budget>"
},
"name": "complete_deck_on_budget"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deck | Yes | Deck id or name | |
| budget | Yes | Money to spend, in `currency` | |
| currency | No | Display currency. USD/EUR come from Scryfall; CHF is always EUR × the stored ECB rate. A response that carries `rate_missing` could not price in CHF at all: tell the user that, not that the cards have no price. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| buy | Yes | ||
| deck | Yes | ||
| text | Yes | ||
| spend | Yes | ||
| budget | Yes | ||
| over_by | Yes | ||
| complete | Yes | ||
| currency | Yes | ||
| claimable | Yes | Free copies not claimed: not missing, claim_from_collection takes them | |
| left_over | Yes | ||
| over_budget | Yes | ||
| no_price_yet | Yes | Left out of every total: say so | |
| rate_missing | No | Present when CHF was asked and no CHF rate is stored: no CHF price could be given at all, the cards are not unpriced. Relay it. | |
| prices_queued | Yes | Always 0: this tool queues nothing; the nightly refresh reaches every printing within a week | |
| total_estimated | Yes | Every missing copy with a price; leaves out no_price_yet | |
| stand_ins_withheld | No | Present when the user's plan has no stand-ins: relay it once, as written | |
| printings_not_compared | Yes | Priced from part of their printings: one not yet priced may be cheaper |