MTG Copilot Docs

Glossary

The words this documentation uses for its own machinery, and which ones collide with a Magic term that means something else.

This defines our vocabulary: the words we coined for how the app stores, tags, searches and reasons about cards.

It does not define Magic. Color identity, mana value, oracle card, the stack and everything else in the game have official definitions with rule citations at /search/concepts, which is generated from the Comprehensive Rules and is the more authoritative source. Where one of our words collides with a Magic word, the entry says so.

The card model

Card. One Magic card, identified by its name and its current rules text. Every printing of Lightning Bolt is the same card. cards

Printing. One release of a card in one set, with its own collector number, artwork, rarity and prices. A card has as many printings as it has appearances. card_printings

Oracle text. A card's current official rules text. This is what the app stores and what the AI reads, so a card that has been errata'd reads as it reads now, not as it was printed.

Finish. Normal, foil or etched. Prices are quoted per printing per finish, so one card can carry a great many prices. Where a price comes from

Provenance

Provenance. The three facts recorded for every column in the database: where the value came from, what writes it, and how often. Every field in the reference carries all three. Data model

Source. Where a value originates. One of scryfall, mtgjson, wotc, wiki, calculated, ai, user or unmaintained.

Owning job. The single job permitted to write a column. When a value looks wrong, this names the thing to re-run. Imports

Cadence. How often the owning job refreshes a value. Shown as "updated" on the reference pages.

Registry. The typed table definitions the reference pages are generated from. A migration that adds a column without registering it fails CI, so every column that exists is documented.

Taxonomy

Game concept. One entry in the app's vocabulary of Magic ideas. 833 of them, either official (defined in the Comprehensive Rules, carrying the rules they cite) or community (deck-building language the rules have no word for, such as ramp). /search/concepts · game_concepts

Taggable. A property of a concept: whether it is used to classify cards. 152 of the 833 are. The rest exist to be looked up and cited.

Semantic tag. A taggable concept as it appears on a card. This is what tag:ramp searches. /search/tags

Concept association. One row joining a card to a concept, recording which pass produced it. A card matched by two passes carries two rows. card_concept_associations

Detection rule. A stored pattern that attaches a concept to any card whose text matches it. tag_detection_rules

Scryfall otag. Scryfall's own tagging vocabulary, which is not imported. Our tags come from the concept vocabulary above, applied by our own passes. Taxonomy and tagging

Token. One term in a search query, such as t:creature or cmc<=3. Tokens are combined with AND unless you write OR. Search syntax

In Magic a token is a game object created by a spell or ability. That sense is a game concept, defined at /search/concepts. When these docs say "token" without qualification they mean the query kind.

IR. The intermediate representation: the tree a query parses into before it reaches the database. It is pure TypeScript with no database access, so the same query means the same thing everywhere it is used. Anatomy of a query

Executor. The code that compiles the IR into database filters and runs them. Recommendations use the same executor as search, so a constraint behaves identically in both.

Smart search. The translation of plain English into query syntax, done by a model. Smart search

The AI

Grounding. Putting real data in front of the model before it answers, rather than relying on what it remembers. It is a claim about inputs, so it makes an invented card easy to catch and says nothing about whether a judgement is good. Grounding and limits

Embedding. A vector standing for the meaning of a card or a concept, used to compare things by similarity rather than by wording. Voyage voyage-3, truncated to 256 dimensions. Tagging and embeddings

Re-rank. Reordering an already-filtered set of cards by how close their embeddings sit to the query. Filtering decides what is eligible, re-ranking decides what comes first. Recommendations

Classifier. The first model call in the chat pipeline. It decides what a message is asking for and what context to load before the expensive model runs. The chat pipeline

Runner. One of the nine deck analyses, each reading the full oracle text of every card in the deck. Deck analysis

Prompt block. A labelled section of the system prompt. The blocks that do not change between turns are cached, which makes a repeat turn much cheaper.

On this page