Skip to main content
Glama

build_deck

Assemble a legal, curve-balanced ~60-card Lorcana decklist by ink pair and format, using your collection, ideal cards, or market-priced builds.

Instructions

Automatically assemble a legal, curve-balanced ~60-card decklist for an ink pair and format, in one of 3 modes:

  • "collection": build only from cards you own (capped at owned quantity per card). If fewer than 60 legal owned cards exist, reports the shortfall honestly instead of padding with irrelevant fillers.

  • "ideal": build the best deck regardless of ownership. If collection_csv is given, also shows what you already own, what's missing, and the price to complete it (via tcgcsv.com).

  • "market": build the best deck ignoring any collection, and prices every card in it (not just the gap) via tcgcsv.com.

This is a heuristic curve/keyword-value builder — it optimizes ink curve, stat efficiency, and keyword value, not multi-card combos or synergy packages. See the disclaimer at the bottom of every result.

format="coconut" builds for Format Coconut (Ravensburger's multiplayer singleton beta, open since 2026-07-28 — rules/card pool may still change; see the project CLAUDE.md's "Format Coconut" section). It needs coconut_card, allows up to 3 ink colors (one must match the Coconut's own ink), has no rotation and no tracked banned list (every released card is treated as legal), and every card in the build is capped at 1 copy except the Coconut's associated real character, which may run up to 4 — this replaces the usual max-4-of-anything rule entirely. Call with format="coconut" and no coconut_card to get the full list of the 18 beta Coconuts to choose from.

Args: ink_colors: Comma-separated ink color(s), e.g. "Amber,Sapphire". 1-2 colors for core/core_zh/core_ja/poorcana, 1-6 for infinity, 1-3 for coconut (must include the Coconut card's own ink — see coconut_card). May be omitted entirely when format="coconut" and coconut_card is also omitted — that combination just lists the 18 beta Coconut cards (filtered to the given ink(s), if any) and doesn't build anything yet. mode: "collection", "ideal", or "market". format: "core", "infinity", "core_zh", "core_ja", "poorcana", or "coconut". collection_csv: Absolute path to an enriched collection CSV. Required for mode="collection"; optional for "ideal"; ignored for "market". rotation_safe: If True and format="core", restrict to the rotation group that will still be legal after the next rotation event. No-op (with a note) for other formats. coconut_card: Required when format="coconut" — fuzzy name of one of the 18 beta Coconut cards (e.g. "Ariel", "Mickey Mouse", "snow white"). Ignored for every other format. include_preview: If True and format is "core" or "infinity", also admit cards from announced sets that aren't legal yet (e.g. Hyperia City before its release date) — whatever LorcanaJSON has revealed so far, which may be a partial set. Preview cards are marked in the decklist and usually have no TCGPlayer price yet. No-op (with a note) for other formats. theme: Optional deck theme — a classification ("princess", "detective", "seven dwarfs", "villain", ...) or a character name ("mickey mouse", "stitch"). Cards of that classification/ name, and cards whose text references it (payoffs like "your Princess characters get +1 ¤"), are strongly preferred. If ink_colors is omitted, the two-ink pair with the most theme cards in the legal pool is chosen automatically (not for coconut, which needs its Coconut's ink).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoideal
themeNo
formatNocore
ink_colorsNo
coconut_cardNo
rotation_safeNo
collection_csvNo
include_previewNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.5.0
    • addedInput schema / properties / include_preview
      Added value: +{
      +  "default": false,
      +  "title": "Include Preview",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / theme
      Added value: +{
      +  "default": "",
      +  "title": "Theme",
      +  "type": "string"
      +}
  2. Changed3 schema fields changedv2.3.0
    • addedInput schema / properties / coconut_card
      Added value: +{
      +  "default": "",
      +  "title": "Coconut Card",
      +  "type": "string"
      +}
    • addedInput schema / properties / ink_colors / default
      Added value: +""
    • removedInput schema / required
      Removed value: -[
      -  "ink_colors"
      -]
  3. First observedv0.2.7

TDQS

A4.7/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 heuristic optimization target, that a disclaimer is appended, that shortfalls are reported rather than padded, that coconut changes the copy-limit rule entirely (1 copy, up to 4 for the associated character), and that preview cards may be partial and unpriced. These are exactly the caveats an agent needs before invoking.

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 bulleted modes, then a per-argument block — a sensible structure for a tool with 6 formats, 3 modes and 8 arguments. It is long, and the mode bullets partially duplicate the 'mode' entry in the Args list, and there is an encoding artifact ('¤') in the theme example, so a point comes off for redundancy.

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-value detail is unnecessary, and the description covers everything else with high complexity: format-specific legality rules, coconut-specific copy limits and ink constraints, and per-mode input requirements. Nothing needed to call it correctly 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 description coverage is 0% — every parameter has only a title and default — yet the description documents all 8: mode values, format values and per-format ink-color limits, required/optional/ignored conditions for collection_csv and coconut_card, the rotation_safe and include_preview no-op cases, and the theme classification-vs-character-name forms. This fully compensates for the schema gap.

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 artifact: 'Automatically assemble a legal, curve-balanced ~60-card decklist for an ink pair and format.' It also immediately scopes what it is not ('heuristic curve/keyword-value builder — not multi-card combos or synergy packages'), separating it from analyze_deck or find_song_synergies.

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

Usage Guidelines4/5

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

The three modes are each given explicit selection conditions, including the fallback behavior when owned cards run short, which is genuine when-to-use guidance. It also documents the degenerate call (format='coconut' with no coconut_card lists the 18 beta Coconuts) so an agent knows how to discover required inputs. It stops short of referencing sibling tools, e.g. that collection_csv should come from enrich_csv, leaving that prerequisite implicit.

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