Skip to content

suggest_sideboard ignores deck color identity, suggests off-color cards #64

Description

@j4th

Summary

suggest_sideboard recommends cards outside the deck's color identity, treating role categories ("graveyard hate", "artifact removal", etc.) as the dominant filter and ignoring the main-deck color constraint.

Per #50 spec, the heuristic path is explicitly: "analyze main deck colors → suggest format-appropriate hate cards from Scryfall bulk data". The color-analysis step appears to be missing or downstream of category selection.

Reproduction

Mono-Izzet (UR) deck — no white, black, or green sources anywhere in the 75:

suggest_sideboard(
  format="Legacy",
  decklist=[
    "4 Dragon's Rage Channeler", "3 Murktide Regent", "1 Subtlety",
    "4 Force of Will", "2 Force of Negation", "4 Daze", "2 Spell Pierce",
    "4 Stifle", "4 Brainstorm", "4 Ponder", "4 Mishra's Bauble",
    "3 Lightning Bolt", "1 Unholy Heat", "1 Consign to Memory",
    "4 Wasteland", "4 Volcanic Island", "3 Scalding Tarn", "3 Polluted Delta",
    "2 Misty Rainforest", "1 Otawara, Soaring City", "1 Mystic Sanctuary",
    "1 Thundering Falls"
  ],
  meta_context="Heavy on Dimir Tempo, Sneak and Show, Oops All Spells, Ocelot Pride, Eldrazi, Lands, Doomsday, Painter, EPIC Storm",
)

Actual output (excerpt)

### Counterspells
- Spell Contortion ({2}{U}) -- addresses counterspells
- Grip of Amnesia ({1}{U}) -- addresses counterspells

### Graveyard Hate
- Crypt Creeper ({1}{B}) -- addresses graveyard hate           ← off-color (B)
- Dawnbringer Cleric ({1}{W}) -- addresses graveyard hate      ← off-color (W)

### Artifact Removal
- Fracturing Gust ({2}{G/W}{G/W}{G/W}) -- addresses artifact removal  ← off-color (GW)
- Goblin Trashmaster ({2}{R}{R}) -- addresses artifact removal

### Enchantment Removal
- Fangkeeper's Familiar ({1}{B}{G}{U}) -- addresses enchantment removal  ← off-color (BUG)
- Requisition Raid ({W}) -- addresses enchantment removal     ← off-color (W)

### Board Wipes
- Supreme Verdict ({1}{W}{W}{U}) -- addresses board wipes     ← off-color (WU)
- Terisiare's Devastation ({X}{2}{B}{B}) -- addresses board wipes  ← off-color (B)

### Lifegain Hate
- Spider-Punk ({1}{R}) -- addresses lifegain hate
- Tibalt, Rakish Instigator ({2}{R}) -- addresses lifegain hate

### Color Hosers
- Sword of Light and Shadow ({3}) -- hoses opposing colors (B, G, W)

10 of the 14 suggestions are uncastable in this deck.

There are also several format-relevance issues (Spell Contortion and Grip of Amnesia are not Legacy-played; Spider-Punk for "lifegain hate" against a meta with no lifegain decks; Sword of L&S as a "color hoser" but it's a 3+2 equipment, not a sideboard card by any tournament reading) — but those are downstream of the color filter, so the color fix is the primary lever.

Expected behavior

For an Izzet (UR) deck in Legacy, a tournament-credible heuristic-only output would surface things like:

  • Counterspells: Pyroblast, Red Elemental Blast, Flusterstorm, Force of Negation, Hydroblast
  • Graveyard hate: Surgical Extraction (colorless), Tormod's Crypt (colorless), Soul-Guide Lantern (colorless), Faerie Macabre (off-color but pitches; debatable inclusion), Endurance (off-color; should be excluded by the same color filter)
  • Artifact removal: Meltdown, Shattering Spree, Abrade, By Force
  • Enchantment removal: limited in UR — colorless options only (Karn, the Great Creator; Pithing Needle as soft answer); honestly flag this gap to the user rather than suggesting GW cards
  • Board wipes: Pyroclasm, Anger of the Gods, End the Festivities, Brotherhood's End

Two design notes:

  1. Color filter should be a hard constraint, not a soft preference. Off-color cards in 60-card constructed are essentially never castable — the player has no off-color sources. (Pitch cards like Endurance or Force of Vigor are an edge case; flag them separately if at all.)
  2. Honestly report gaps. If a category has no on-color answers (Izzet has no enchantment removal in mono-UR), the tool should say so — "no strong UR answers for this category in {format}; consider colorless options" — rather than fabricating cross-color suggestions.

Suspected root cause

The role-categorization step (oracle text → role) appears to run before any color filter, and either:

  • The color filter step doesn't exist, or
  • The color filter is applied as a ranking signal rather than a hard filter, so off-color cards still surface when on-color cards are sparse.

The expected pipeline per #50: parse decklist → derive color identity → filter Scryfall bulk to that color identity (+ colorless) → categorize remaining cards by role → rank → return.

Cross-reference

Originating feature: #50

Environment

  • Server: live Smithery deployment (mtg-mcp-server.fastmcp.app/mcp)
  • Format tested: Legacy
  • Date: 2026-05-03

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions