search_cards
Search Magic: The Gathering cards by name, set, rarity, type, or format legality. Returns paginated results with prices and metadata.
Instructions
Search Magic: The Gathering cards by name (substring), set code, rarity, type, or format legality. Returns a paginated list with prices and basic metadata. Use this for catalog lookups; for a specific printing prefer get_card with set+number.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Substring to search card name + flavor name. Optional; omit to filter purely by setCode/rarity/type/format. | |
| setCode | No | 3-5 character set code (e.g. 'lea', 'mh3'). | |
| rarity | No | Filter by rarity. | |
| type | No | Substring match against card type line (e.g. 'Goblin', 'Instant'). | |
| format | No | Filter to cards with a legality entry in this format (e.g. 'modern', 'commander'). | |
| legality | No | Used with 'format'. Defaults to 'legal' when format is set. | |
| page | No | 1-based page index. | |
| limit | No | Page size (max 100). |