Skip to main content
Glama

build_deck

Assemble a legal, curve-balanced 60-card Lorcana deck for any ink pair and format, built from your collection, the ideal card pool, or current market prices.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoideal
formatNocore
ink_colorsNo
coconut_cardNo
rotation_safeNo
collection_csvNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      -]
  2. 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 discharges it: it discloses that shortfalls are reported honestly rather than padded, that pricing comes from tcgcsv.com (and only for the gap in 'ideal' vs all cards in 'market'), that the builder is a heuristic curve/keyword-value optimizer and not a combo/synergy engine, and that a disclaimer is attached to every result.

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 purpose followed by tightly grouped bullet lists per mode and per argument; every sentence is functional. It runs long on Coconut-specific rules, but that detail is necessary given how unusual that format's legality rules are.

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-shape explanation isn't required, and the definition still covers edge cases an agent would otherwise guess at: shortfall reporting, the no-build listing call, pricing scope per mode, and rotation behaviour. Nothing material is missing for correct invocation.

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% with six bare defaulted parameters, so the description must compensate and does: per-format ink_color counts, rotation_safe being a no-op outside 'core', coconut_card's fuzzy-name matching and the ink requirement, and the omitted-both-args listing behaviour. These are exactly the semantics the schema lacks.

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?

Opens with a specific verb, resource, and scope: 'assemble a legal, curve-balanced ~60-card decklist for an ink pair and format'. The three modes are enumerated immediately, so an agent can differentiate build behaviour without opening the schema.

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?

Rich when-to-use guidance: mode semantics (collection vs ideal vs market), that collection_csv is required for 'collection', optional for 'ideal', ignored for 'market', and that the 'coconut' call with no coconut_card just lists the 18 Coconuts. It never names a sibling alternative (e.g. analyze_deck or what_am_i_missing), so routing between tools is left to inference.

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