Skip to main content
Glama

analyze_deck

Checks a raw Lorcana deck list for ink curve, composition, and Core Constructed legality, helping verify whether the deck is legal 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, no cards on the official Core ban list), 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.

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": {
      "deck_list": "<deck_list>"
    },
    "name": "analyze_deck"
  }
}

Input Schema

NameRequiredDescriptionDefault
deck_listYes

Output 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?

With no annotations, the description carries the full burden and does so: it discloses the name-matching algorithm (exact then substring, explicitly not fuzzy like resolve_card), the critical side effect that unresolved lines are silently excluded from every statistic, and the resulting under-reporting risk. It also scopes the legality check precisely (Core Constructed only, not rotation or Infinity/Poorcana) and confirms it never touches the collection.

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 purpose, then input format, outputs, behavior, and usage — a logical progression with no filler sentences. It is somewhat long, and the trailing 'Args: deck_list' line restates the line-format guidance already given above, while the 'Reports:' enumeration partly duplicates the existing output schema.

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?

For a one-parameter analysis tool with an output schema, the description covers everything an agent needs to call it correctly and to interpret the result honestly — input syntax, silent exclusion of unresolved cards, and the limits of the legality check. The remaining return-value detail is backed by the output schema, so nothing material is missing.

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 coverage is 0% for the single parameter, so the description must compensate — and it does, specifying one-card-per-line format, both '4x Name' and '4 Name' quantity syntaxes, that quantity is optional and defaults to 1, and that '#' and '//' lines are treated as comments. That is more than the bare schema conveys and covers the realistic input-format failure modes.

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 and resource ('Analyze a raw deck list') plus the exact outputs (ink curve, composition, Core Constructed legality), and immediately disambiguates the input type from a collection CSV. The framing 'independent of what you own or can afford' cleanly separates it from collection-oriented siblings like what_am_i_missing.

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 triggers ('a decklist you already have — hand-written, pasted from elsewhere, or build_deck's output') and an explicit alternative with its condition ('for what's missing or what it costs, use what_am_i_missing instead'). It also routes rotation-safety questions to search_cards or build_deck(rotation_safe=True), so the boundaries against siblings are drawn in both directions.

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