Find substitutes
find_substitutesCards that could replace a target card, two ways. similar: the cards whose rules text is nearest the target's (precomputed over the whole catalogue, best first: nearest by text, with a nearer mana value, a more played card and one whose effects point at the same side ahead; similarity 0–1 is the text closeness alone, not a verdict), fitted to the deck when given — its colour identity (both commanders of a pair, else the target's), legal in its format, not already in it — as owned (the user's cards with free copies) and to_buy (cheapest priced printing in currency, null when none is priced; owned_claimed = copies the user owns that the decks in claimed_by claim in full: name them). Nearness is in the words, not in how a card plays with the deck: YOU judge which do the job, and say so. similar.known false means no list exists for the card yet. candidates: owned cards passing mechanical filters only (a shared primary type, cmc within cmc_window, default ±2, ignored for lands; optional price_ceiling per copy; with a deck, legal in its format). Both lists leave out a banned card, and a restricted one unless the row holds a single copy, since a swap keeps the row's count. Disclose free vs. claimed counts, say proxies beside a card that has any, and name every deck in shared_with. A card to buy with no price yet gets one from the nightly price refresh (price_queued is always false: this tool queues nothing). To make the swap, call replace_card with the row's want_id. Read-only: it changes nothing and starts no work; a target named by a name newer than the catalogue is looked up on Scryfall. Not on every plan: a PLAN_LIMIT answer says so.
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": {
"target": "<target>"
},
"name": "find_substitutes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deck | No | Deck context (id or name) | |
| limit | No | ||
| target | Yes | The card to replace | |
| 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. | |
| cmc_window | No | ||
| price_ceiling | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | Yes | ||
| target | Yes | ||
| similar | Yes | ||
| candidates | Yes | Owned cards passing mechanical filters only: judge functional similarity yourself | |
| constraints | Yes |