Skip to content
@tcg-schema

tcg-schema.org

tcg-schema

TCG-SCHEMA is an open, schema.org-aligned ontology for Trading Card Games (TCG/CCG/LCG). It provides a structured semantic layer for:

  • Cards vs printings
  • Sets and releases
  • Decklists and formats
  • Mechanics and counters
  • Resource systems (mana, ink, energy, etc.)
  • Metagame archetypes and matchups
  • Evidence-based counterclaims
  • LLM-friendly card descriptors

The goal is simple and ambitious:

Make card games machine-readable without reducing them to a toy simulator.


Why tcg-schema?

Most card game data exists in one of three forms:

  1. Raw card databases (names, text, sets)
  2. Market data (prices, printings, SKUs)
  3. Decklists and tournament results

What’s missing is a formal semantic layer that connects:

  • Game rules
  • Card intent and interaction axes
  • Deckbuilding roles
  • Format legality
  • Metagame structure
  • AI-assisted interpretation

tcg-schema fills that gap.


Design Principles

1. Card Identity ≠ Printing

A tcg:Card is the abstract identity. A tcg:CardPrinting is a specific product instance.

This distinction is non-negotiable.

2. Game-Agnostic Core

The core schema supports:

  • Magic
  • Lorcana
  • Pokémon
  • Flesh and Blood
  • Yu-Gi-Oh
  • Future games not yet invented

Game-specific modules extend the core (e.g., tcg-mtg).

3. No Rules Engine

We model structure and meaning — not full gameplay simulation.

This allows:

  • Knowledge graphs
  • Search
  • Deckbuilding heuristics
  • Counter-analysis
  • LLM grounding

Without building a digital judge program.

4. Evidence-Aware Metagame

Counter relationships are not dogma.

A tcg:CounterClaim must have:

  • format
  • time window
  • sample size
  • method
  • evidence

Metagames drift. The graph must reflect that.

5. LLM-First Semantics

Cards include structured descriptors:

  • role (removal, engine, finisher, etc.)
  • interaction axis (stack, graveyard, combat, resource denial)
  • synergy tags
  • polarity (helpsOwnPlan / disruptsOpponent)
  • confidence and extraction method

This enables explainable AI-assisted deck construction.


Repository Structure

tcg-schema/
│
├── core/
│   └── tcg-schema-core.ttl
│
├── descriptors/
│   └── tcg-descriptors.ttl
│
├── mtg/
│   ├── tcg-mtg-extension.ttl
│   ├── mtg-rules-sections.ttl
│   └── mtg-terms.ttl
│
├── examples/
│   ├── card-example.jsonld
│   ├── deck-example.jsonld
│   └── counterclaim-example.jsonld
│
└── docs/
    └── site/

Core Concepts

Game Layer

  • tcg:CardGame
  • tcg:CardSet
  • tcg:Format
  • tcg:Legality

Card Layer

  • tcg:Card
  • tcg:CardPrinting
  • tcg:CardFace
  • tcg:Ability
  • tcg:Effect
  • tcg:CounterType

Resource Layer

  • tcg:ResourceSystem
  • tcg:ResourceType
  • tcg:ResourceCost
  • tcg:ResourceCostComponent

Works for:

  • Mana
  • Ink
  • Energy
  • Pitch systems
  • Hybrid systems

Metagame Layer

  • tcg:Archetype
  • tcg:Matchup
  • tcg:CounterClaim
  • tcg:EvidenceBundle

LLM Descriptor Layer

  • tcg:DescriptorType
  • tcg:CardDescriptor
  • tcg:ExtractionMethod
  • tcg:DescriptorEvidence

What You Can Build With This

  • A format-aware deck builder from your collection
  • A metagame analysis engine
  • A cost-effective counter recommender
  • A semantic search engine for card interactions
  • A structured RAG pipeline grounded in card rules
  • A knowledge graph across multiple TCGs

Example (High-Level)

A card:

  • has role = removal
  • interactionAxis = stackInteraction
  • polarity = disruptsOpponent
  • costProfile = cheap
  • confidence = 0.92

A counterclaim:

  • archetype A counters archetype B
  • winRate = 0.58
  • sampleSize = 432
  • timeWindow = Jan–Mar 2026
  • method = logisticRegression

No vibes. Just structured evidence.


Status

Early core is stable. Game-specific modules are in progress.

Planned:

  • MTG complete rule anchoring
  • Lorcana extension
  • Pokémon extension
  • JSON-LD examples
  • SHACL validation shapes
  • Public SPARQL endpoint (experimental)

Contributing

We welcome:

  • Ontology feedback
  • New game modules
  • Descriptor vocabulary proposals
  • Validation shapes (SHACL)
  • Dataset alignment mappings
  • Example JSON-LD documents
  • Documentation improvements

Open an issue. Be precise. Cite rules when relevant.

Popular repositories Loading

  1. schemas schemas Public

  2. tcg-schema.github.io tcg-schema.github.io Public

    TypeScript

  3. onto-mcp onto-mcp Public

    Forked from ontorag/onto-mcp

    Python

  4. .github .github Public

  5. ff-lcg ff-lcg Public

    TypeScript

  6. arkhamdb arkhamdb Public

    Forked from Kamalisk/arkhamdb

    JavaScript

Repositories

Showing 10 of 11 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…