USE WHEN: answering Magic rules questions, looking up card interactions, checking keyword abilities, explaining combat/priority/stack mechanics, verifying card rulings. COVERS: comprehensive rules lookup, card-specific rulings, glossary, topic search, rule sections reference, when to use rules vs rulings.
🚨 ALWAYS use this tool when answering rules questions - don't rely on memory!
# Look up specific rule by number
npm run rules 116.3 # Priority rules
npm run rules 301.5 # Equipment rules
npm run rules 702.6 # Equip keyword ability
# Search rules by keyword
npm run rules -- --search "priority" # Find all rules mentioning priority
npm run rules -- --search "equipment" # Find all rules about equipment
npm run rules -- --search "dies" # Find rules about creatures dying
# Look up glossary terms
npm run rules -- --glossary "flash" # Definition of Flash
npm run rules -- --glossary "trample" # Definition of Trample
# Search rules by topic (section-based)
npm run rules -- --topic "combat" # All combat-related rules (506-511)
npm run rules -- --topic "stack" # All stack-related rules
npm run rules -- --topic "mana" # All mana-related rules
# Force refresh rules from Wizards (30-day cache)
npm run rules -- --refresh
# Fetch card details with official rulings from Wizards/Scryfall
npm run rulings "Card Name"
Provides card basics (mana cost, type, oracle text) plus official rulings including clarifications, interactions, and judge decisions.
npm run rules = How mechanics work in general (comprehensive game rules)npm run rulings "Card Name" = How a specific card works (card-specific rulings)Examples:
npm run rules -- --search "priority"npm run rules 301.5 then npm run rules 702.6npm run rules -- --glossary "flash"npm run rules -- --topic "combat"npm run rulings "Lightning Greaves" + npm run rules 702.6npm run rules -- --search "priority" or npm run rules 117npm run rules -- --topic "combat" (sections 506-511)npm run rules -- --search "stack" or npm run rules 405npm run rules 702 prefix (702.6 = Equip, 702.2 = Flying, etc.)npm run rules 3 prefix (301 = Artifacts, 302 = Creatures, etc.)ALWAYS cite rule numbers in answers for accuracy and trust:
# User: "When can I use instants during combat?"
# Step 1: Look up combat rules
npm run rules -- --topic "combat"
# Step 2: Find priority rules
npm run rules -- --search "priority"
# Step 3: Cite in answer:
# "You can cast instants whenever you have priority (rule 117.1a).
# In combat, both players get priority at the start of each step (rule 506.2)..."
cache/comprehensive-rules.json--refresh to force re-download