MagicMancer
MagicMancer · Acciones GPT
MagicMancerX – Scryfall Integration
Actions for MagicMancerX to query Scryfall for MTG card data, pricing, and search-based discovery.
GET /cards/namedFetch a card's details by nameGET /cards/{id}Fetch a single card by Scryfall UUIDGET /cards/{code}/{number}Fetch a card by set code + collector numberGET /cards/searchSearch for cards using Scryfall's full-text syntaxPOST /cards/collectionFetch many cards by identifiers (batch)GET /cards/autocompleteAutocomplete card namesGET /catalog/card-namesRetrieve all nontoken English card names
Esquema original API
{
"openapi": "3.1.0",
"info": {
"title": "MagicMancerX – Scryfall Integration",
"version": "1.0.0",
"description": "Actions for MagicMancerX to query Scryfall for MTG card data, pricing, and search-based discovery."
},
"servers": [
{
"url": "https://api.scryfall.com"
}
],
"paths": {
"/cards/named": {
"get": {
"summary": "Fetch a card's details by name",
"operationId": "getCardByName",
"parameters": [
{
"name": "fuzzy",
"in": "query",
"schema": {
"type": "string"
},
"description": "A fuzzy card name to search for, which may include misspellings."
},
{
"name": "exact",
"in": "query",
"schema": {
"type": "string"
},
"description": "An exact card name to search for, case insensitive."
}
],
"responses": {
"200": {
"description": "Card object containing details of the card",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Card"
}
}
}
},
"404": {
"description": "No card found with that name"
}
}
}
},
"/cards/{id}": {
"get": {
"summary": "Fetch a single card by Scryfall UUID",
"operationId": "getCardById",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Scryfall card UUID"
}
],
"responses": {
"200": {
"description": "A single Card",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Card"
}
}
}
},
"404": {
"description": "Card not found"
}
}
}
},
"/cards/{code}/{number}": {
"get": {
"summary": "Fetch a card by set code + collector number",
"operationId": "getCardByCollectorNumber",
"parameters": [
{
"name": "code",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "Set code (e.g., 'one', 'eld')"
},
{
"name": "number",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "Collector number within the set"
},
{
"name": "lang",
"in": "query",
"schema": {
"type": "string"
},
"description": "Optional language code for this printing"
}
],
"responses": {
"200": {
"description": "A single Card",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Card"
}
}
}
},
"404": {
"description": "Card not found"
}
}
}
},
"/cards/search": {
"get": {
"summary": "Search for cards using Scryfall's full-text syntax",
"operationId": "searchCardsWithQuery",
"parameters": [
{
"name": "q",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "Scryfall full-text search query (type, color, rules text, legality, price, etc.)"
},
{
"name": "unique",
"in": "query",
"schema": {
"type": "string",
"enum": [
"cards",
"art",
"prints"
]
},
"description": "Control which records are returned: unique cards, artworks, or all prints."
},
{
"name": "order",
"in": "query",
"schema": {
"type": "string",
"enum": [
"name",
"set",
"released",
"rarity",
"color",
"usd",
"tix",
"eur",
"cmc",
"power",
"toughness",
"edhrec",
"penny",
"artist",
"review"
]
},
"description": "Sort results by the given field."
},
{
"name": "dir",
"in": "query",
"schema": {
"type": "string",
"enum": [
"auto",
"asc",
"desc"
]
},
"description": "Sort direction."
},
{
"name": "page",
"in": "query",
"schema": {
"type": "integer",
"minimum": 1
},
"description": "Results page number (pagination)."
},
{
"name": "include_extras",
"in": "query",
"schema": {
"type": "boolean"
},
"description": "Include tokens, planes, etc."
},
{
"name": "include_multilingual",
"in": "query",
"schema": {
"type": "boolean"
},
"description": "Include cards in every supported language."
},
{
"name": "include_variations",
"in": "query",
"schema": {
"type": "boolean"
},
"description": "Include rare card variants."
}
],
"responses": {
"200": {
"description": "List of cards matching the query (paginated)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListOfCards"
}
}
}
}
}
}
},
"/cards/collection": {
"post": {
"summary": "Fetch many cards by identifiers (batch)",
"operationId": "getCardCollection",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"identifiers"
],
"properties": {
"identifiers": {
"type": "array",
"minItems": 1,
"maxItems": 75,
"items": {
"$ref": "#/components/schemas/CardIdentifier"
},
"description": "Up to 75 identifiers per request (name, id, oracle_id, set + collector_number, etc.)"
}
}
}
}
}
},
"responses": {
"200": {
"description": "A list with the requested cards; includes 'not_found' for misses",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListOfCards"
}
}
}
}
}
}
},
"/cards/autocomplete": {
"get": {
"summary": "Autocomplete card names",
"operationId": "autocompleteCardNames",
"parameters": [
{
"name": "q",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "Partial card name to autocomplete"
},
{
"name": "include_extras",
"in": "query",
"schema": {
"type": "boolean"
},
"description": "Include uncommon extras"
}
],
"responses": {
"200": {
"description": "Catalog of up to 20 English card names",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Catalog"
}
}
}
}
}
}
},
"/catalog/card-names": {
"get": {
"summary": "Retrieve all nontoken English card names",
"operationId": "getCatalogCardNames",
"responses": {
"200": {
"description": "Catalog of card names",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Catalog"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Card": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "A unique ID for this card in Scryfall’s database."
},
"oracle_id": {
"type": "string",
"format": "uuid",
"description": "A unique ID for this card’s oracle identity."
},
"arena_id": {
"type": [
"integer",
"null"
],
"description": "This card’s Arena ID, if any."
},
"lang": {
"type": "string",
"description": "A language code for this printing."
},
"mtgo_id": {
"type": [
"integer",
"null"
],
"description": "This card’s Magic Online ID, if any."
},
"mtgo_foil_id": {
"type": [
"integer",
"null"
],
"description": "This card’s foil Magic Online ID, if any."
},
"multiverse_ids": {
"type": "array",
"items": {
"type": "integer"
},
"description": "This card’s multiverse IDs on Gatherer, if any."
},
"tcgplayer_id": {
"type": [
"integer",
"null"
],
"description": "This card’s ID on TCGplayer’s API, if any."
},
"tcgplayer_etched_id": {
"type": [
"integer",
"null"
],
"description": "This card’s etched ID on TCGplayer’s API, if any."
},
"cardmarket_id": {
"type": [
"integer",
"null"
],
"description": "This card’s ID on Cardmarket’s API, if any."
},
"object": {
"type": "string",
"description": "A content type for this object, always 'card'."
},
"layout": {
"type": "string",
"description": "A code for this card’s layout."
},
"image_uris": {
"type": "object",
"properties": {
"small": {
"type": "string",
"format": "uri"
},
"normal": {
"type": "string",
"format": "uri"
},
"large": {
"type": "string",
"format": "uri"
},
"png": {
"type": "string",
"format": "uri"
},
"art_crop": {
"type": "string",
"format": "uri"
},
"border_crop": {
"type": "string",
"format": "uri"
}
},
"description": "An object containing URIs for images of this card."
},
"cmc": {
"type": "number",
"description": "The card’s mana value."
},
"type_line": {
"type": "string",
"description": "The type line of this card."
},
"oracle_text": {
"type": "string",
"description": "The Oracle text for this card."
},
"colors": {
"type": "array",
"items": {
"type": "string"
},
"description": "This card’s colors."
},
"color_identity": {
"type": "array",
"items": {
"type": "string"
},
"description": "This card’s color identity."
},
"keywords": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of keywords that this card uses."
},
"legalities": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "An object describing the legality of this card across play formats."
},
"games": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of games where this card is available."
},
"reserved": {
"type": "boolean",
"description": "Whether or not this card is reserved."
},
"foil": {
"type": "boolean",
"description": "Whether or not this card can be foil."
},
"nonfoil": {
"type": "boolean",
"description": "Whether or not this card can be nonfoil."
},
"oversized": {
"type": "boolean",
"description": "Whether or not this card is oversized."
},
"promo": {
"type": "boolean",
"description": "Whether or not this card is a promo card."
},
"reprint": {
"type": "boolean",
"description": "Whether or not this card is a reprint."
},
"variation": {
"type": "boolean",
"description": "Whether or not this card is a variation."
},
"set": {
"type": "string",
"description": "The set code this card belongs to."
},
"set_name": {
"type": "string",
"description": "The full set name this card belongs to."
},
"set_type": {
"type": "string",
"description": "The type of set (core, expansion, masters, etc)."
},
"set_uri": {
"type": "string",
"format": "uri",
"description": "URI to the set on Scryfall’s API."
},
"set_search_uri": {
"type": "string",
"format": "uri",
"description": "URI to search this card’s set on Scryfall’s API."
},
"scryfall_set_uri": {
"type": "string",
"format": "uri",
"description": "URI to this card’s set on Scryfall’s website."
},
"rulings_uri": {
"type": "string",
"format": "uri",
"description": "URI to this card’s rulings on Scryfall’s API."
},
"prints_search_uri": {
"type": "string",
"format": "uri",
"description": "URI to where you can begin paginating all reprints for this card on Scryfall’s API."
},
"collector_number": {
"type": "string",
"description": "The collector number for this card."
},
"digital": {
"type": "boolean",
"description": "Whether or not this card is available digitally."
},
"rarity": {
"type": "string",
"description": "The rarity of the card."
},
"flavor_text": {
"type": "string",
"description": "The flavor text of the card."
},
"card_back_id": {
"type": "string",
"format": "uuid",
"description": "A unique ID for the back of this card."
},
"artist": {
"type": "string",
"description": "The name of the artist for this card."
},
"illustration_id": {
"type": "string",
"format": "uuid",
"description": "A unique ID for this card’s illustration."
},
"border_color": {
"type": "string",
"description": "The border color for this card."
},
"frame": {
"type": "string",
"description": "The frame layout for this card."
},
"full_art": {
"type": "boolean",
"description": "Whether or not the card is full art."
},
"textless": {
"type": "boolean",
"description": "Whether or not the card is textless."
},
"booster": {
"type": "boolean",
"description": "Whether or not this card appears in boosters."
},
"story_spotlight": {
"type": "boolean",
"description": "Whether or not this card is a story spotlight."
},
"edhrec_rank": {
"type": "integer",
"description": "This card’s overall rank/popularity on EDHREC."
},
"prices": {
"type": "object",
"properties": {
"usd": {
"type": "string"
},
"usd_foil": {
"type": "string"
},
"eur": {
"type": "string"
},
"tix": {
"type": "string"
}
},
"description": "An object containing various pricing information for this card."
},
"related_uris": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "An object containing related URIs for external resources."
},
"purchase_uris": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "An object containing URIs for purchasing this card."
}
}
},
"ListOfCards": {
"type": "object",
"description": "A Scryfall List response containing Card objects. 'total_cards' typically appears for search results. 'not_found' appears for /cards/collection.",
"properties": {
"object": {
"type": "string",
"description": "Always 'list'."
},
"total_cards": {
"type": "integer",
"description": "Total cards across all pages (commonly returned by searches)."
},
"has_more": {
"type": "boolean",
"description": "True if another page of results exists."
},
"next_page": {
"type": "string",
"format": "uri",
"description": "URL for the next page, if any."
},
"warnings": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional warnings related to the query."
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Card"
},
"description": "Card results."
},
"not_found": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CardIdentifier"
},
"description": "Identifiers that did not resolve (only present on /cards/collection)."
}
}
},
"CardIdentifier": {
"type": "object",
"description": "Provide at least one of: id, oracle_id, multiverse_id, mtgo_id, illustration_id, name, or set+collector_number.",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Scryfall UUID"
},
"oracle_id": {
"type": "string",
"format": "uuid"
},
"multiverse_id": {
"type": "integer"
},
"mtgo_id": {
"type": "integer"
},
"illustration_id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string",
"description": "Exact English name is recommended for reliability."
},
"set": {
"type": "string",
"description": "Set code; use with collector_number."
},
"collector_number": {
"type": "string",
"description": "Collector number; use with set."
}
},
"anyOf": [
{
"required": [
"id"
]
},
{
"required": [
"oracle_id"
]
},
{
"required": [
"multiverse_id"
]
},
{
"required": [
"mtgo_id"
]
},
{
"required": [
"illustration_id"
]
},
{
"required": [
"name"
]
},
{
"required": [
"set",
"collector_number"
]
}
]
},
"Catalog": {
"type": "object",
"description": "A Scryfall Catalog containing an array of values (e.g., names).",
"properties": {
"object": {
"type": "string",
"description": "Always 'catalog'."
},
"total_values": {
"type": "integer",
"description": "Total number of values."
},
"data": {
"type": "array",
"items": {
"type": "string"
},
"description": "The catalog data."
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}