Skip to main content
Glama

Check a decklist's legality

check_legality
Read-onlyIdempotent

Whether a pasted decklist is legal, without saving it: in one format, or in every format when none is given. Takes the list as text ("4 Lightning Bolt" a line; a "Commander" and a "Sideboard" section, or CMDR, as the sites write them), any language Scryfall prints. Each verdict has legal and its issues (severity error or warning, code, message: size, copy limits, banned and restricted cards, commander and colour identity, the companion's condition). A list with a card in not_found is never called legal: the not_checked issue names those cards; say so. read_as names a card read in another language. Read from the card catalogue only; it works before the user signs in. For a deck already in Reliquary, deck_health reports more (missing cards, shared copies, proxies).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "decklist": "<decklist>"
    },
    "name": "check_legality"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNoOne format to judge; omitted, every format but casual. commander | pdh (Pauper Commander) | dc (Duel Commander) | standard | pioneer | modern | legacy | vintage | pauper | casual
decklistYesThe decklist as text, at most 250 different cards

Output Schema

NameRequiredDescriptionDefault
noteYes
read_asYesNames read in another language, each with its card: "Foudre → Lightning Bolt"
verdictsYesOne a format: the format asked, or every format but casual
companionYesThe companion the list names, or null
not_foundYesNames the catalogue does not know, as typed: they were not checked, so say so
commandersYesThe commanders the list names, by their English names
main_cardsYesCards read in the main deck, the commanders among them
shared_namesYesNames in another language several cards share: not checked; ask which card is meant
ignored_linesYesLines that were not read as cards (a maybeboard, a stray line)
sideboard_cardsYesCards read in the sideboard, the companion among them

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations' read-only/idempotent/closed-world profile, it discloses that nothing is persisted, that no-format means all formats except casual, that the card catalogue is the only data source, and a non-obvious rule: a list with a card in not_found is never legal and must be reported via the not_checked issue. That is behavior an agent could not infer from annotations or schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the purpose and the no-save constraint, and every sentence carries information. The parenthetical-heavy, telegraphic style ('or *CMDR*, as the sites write them') packs a lot into few words but makes it slightly dense on first read.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The verdict shape (legal, issues with severity/code/message, not_found, read_as) and the edge-case rule are covered, and an output schema exists so full return enumeration is unnecessary. Combined with format defaulting and the sibling pointer, an agent has everything needed to call and interpret it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds real meaning: the default when format is omitted ('every format but casual'), and concrete decklist text conventions ('4 Lightning Bolt' per line, Commander/Sideboard sections, *CMDR*) plus acceptance of any Scryfall-printed language. It stops short of explaining the enum values, which the schema already does.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a concrete verb and resource (check legality of a pasted decklist) and immediately bounds scope: 'without saving it', one format or all formats. It explicitly distinguishes itself from deck_health for already-saved decks, so an agent can choose without opening sibling schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear when-to-use conditions (a pasted list, not a saved deck), a default behavior when format is omitted, and an explicit alternative ('For a deck already in Reliquary, deck_health reports more'). It also states a prerequisite-relevant fact: it works before the user signs in.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources