Skip to main content
Glama

analyze_deck

Analyze a raw deck list to get its ink curve, composition, and Core Constructed legality, confirming whether the deck is legal and well-built before playtesting.

Instructions

Analyze a raw deck list (a list of card names, not a collection CSV) and return its ink curve, composition, and Core Constructed legality — the tool for "is this decklist actually good/legal", independent of what you own or can afford.

Accepts one card per line, e.g. "4x Goofy - Musketeer" or "4 Goofy - Musketeer" (both "4x" and "4 " are accepted; qty is optional and defaults to 1). Lines starting with "#" or "//" are treated as comments and skipped.

Reports: ink curve (1-2/3-4/5-6/7+ cost brackets), inkable vs. uninkable count, color split, card type split, an estimated lore-per-turn (sum of Character lore values), a Core Constructed legality check (60-card minimum, max 4 copies of any card, at most 2 ink colors), and any card names that couldn't be resolved.

Behavior: card names are matched the same simple way as lookup_card (exact, then substring) — not fuzzy-resolved like resolve_card — so a typo'd or oddly-abbreviated name lands in the unresolved list rather than being guessed. Unresolved lines are excluded from every stat (curve, color split, lore/turn, legality counts), so a deck list with several unresolved names will under-report its true totals; always check that list before trusting the numbers. The legality check is Core Constructed only — it does not check rotation-group safety (whether the deck's cards survive the next rotation) or Infinity/Poorcana rules; for rotation safety, cross-reference the card list against search_cards filtered by set, or build fresh via build_deck(rotation_safe=True).

Usage guidelines: use this on a decklist you already have — hand-written, pasted from elsewhere, or build_deck's output — to sanity-check curve and legality before playtesting or buying anything. It never touches your collection, so it can't tell you what's missing or what it costs; for that, feed the same deck list to what_am_i_missing instead.

Args: deck_list: Raw deck list text, one card per line.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deck_listYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.7

TDQS

A4.9/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does so: it discloses the name-matching rule (exact then substring, unlike resolve_card's fuzzy matching), warns that unresolved lines are dropped from every stat and cause under-reporting, and scopes the legality check to Core Constructed only, excluding rotation/Infinity/Poorcana. These are exactly the behavioral caveats an agent needs to avoid misreporting results.

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 benefit, then format, then reports, then behavior. Every section is useful, though the description is long and dense; a small amount of the enumeration (e.g. the full list of reports) could be tightened.

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

Completeness5/5

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

An output schema exists, so return values need not be explained, yet the description still previews the report contents. Combined with the input-format rules, matching caveats, and legality scope limits, an agent has everything required to invoke this correctly and interpret the results.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it does: it defines the accepted input format in detail (one card per line, '4x' or '4 ' both valid, quantity optional defaulting to 1, '#' and '//' lines skipped as comments). This fully documents the single parameter beyond the bare string type in the schema.

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?

States a specific verb+resource (analyze a raw deck list) and enumerates exactly what it returns: ink curve, composition, and Core Constructed legality. It explicitly contrasts itself with a collection CSV and with the fuzzy resolver, so an agent can distinguish it from lookup_card, resolve_card, and enrich_csv without opening 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 explicit when-to-use ('a decklist you already have — hand-written, pasted from elsewhere, or build_deck's output') and names alternatives for adjacent needs: what_am_i_missing for ownership/cost, and search_cards or build_deck(rotation_safe=True) for rotation safety. Exclusions are stated, not implied.

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