Skip to main content
Glama

enrich_csv

Enrich a raw TCGPlayer Lorcana CSV export with full card data — the required first step before any other tool here can read your collection (filter_collection, audit_csv, what_am_i_missing, build_deck, and find_song_synergies's…

Instructions

Enrich a raw TCGPlayer Lorcana CSV export with full card data — the required first step before any other tool here can read your collection (filter_collection, audit_csv, what_am_i_missing, build_deck, and find_song_synergies's collection_csv all expect this tool's output, not the raw TCGPlayer export).

Fetches card data from LorcanaJSON (sets 12+) and lorcana-api.com (sets 1–11) and adds Ink color, Ink Cost, Card Type, Subtypes, Strength, Willpower, Lore Points, Inkable, Keywords, and Abilities to each row. Both sources are disk-cached 24h, so a second run soon after the first is fast regardless of cache_path.

Behavior: writes two new files next to the input — never modifies input_path itself — and always reports fill-rate stats per column plus any cards it couldn't match (usually a name typo in the export, or a brand-new card the APIs haven't indexed yet). Promo cards (Set Name "Disney Lorcana Promo Cards") are matched by name against their non-promo equivalent for stats, and separately resolved to a dreamborn.ink-importable (Set Number, Card Number) row when this server's built-in promo table covers that card; promos it doesn't recognize are listed for manual entry rather than guessed. Illumineer's Quest rows (co-op box cards, set "Illumineer's Quest: ...") are listed in their own table. Player-deck cards (incl. the alt-art foils) are reprints: they get the regular printing's data, count as normal legal copies, and go into the dreamborn file under the set/number printed on the card. Scenario/villain deck cards, Vinelings and tokens have no regular printing: they're classified quest-only (blank card data, never owned or legal in Core, Infinity, Coconut or Poorcana). cache_path only skips re-fetching for card names already present in that prior enriched CSV — it does not skip enrichment for new cards in the input.

Writes two output files next to the input: enriched_{filename} — enriched collection CSV dreamborn_{filename} — import-ready CSV for dreamborn.ink

Usage guidelines: run this on every fresh TCGPlayer export before doing anything else with it. Pass cache_path pointing at your previous enriched CSV on a re-export to speed things up — otherwise every row re-fetches from the API even for cards you've already enriched before. Use refresh_prices=True specifically to bring an existing enriched CSV's prices current without a fresh TCGPlayer export (it only touches the price column, not the card-data columns); leave it off for a same-day fresh export, since the TCGPlayer download already has current prices and refreshing adds an extra tcgcsv.com call per row.

Args: input_path: Absolute path to the raw TCGPlayer CSV export. cache_path: Optional path to a previous enriched CSV to speed up re-runs by skipping API calls for cards already seen. refresh_prices: If True, overwrite each row's TCG Market Price with a live tcgcsv.com lookup for that exact printing, instead of leaving whatever the raw TCGPlayer export had at download time. Use this to bring an old enriched CSV's prices current without re-exporting from TCGPlayer.

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": {
      "input_path": "<input_path>"
    },
    "name": "enrich_csv"
  }
}

Input Schema

NameRequiredDescriptionDefault
cache_pathNo
input_pathYes
refresh_pricesNo

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?

No annotations are provided, so the description carries the full burden and does so: it discloses that input_path is never modified, that two new files are written, the 24h disk-cache behavior, fill-rate reporting, unmatched-card reporting with cause, and nuanced per-category handling (promos, Illumineer's Quest, player-deck reprints, tokens/Vinelings classified quest-only). This is exactly the behavioral context annotations would otherwise supply.

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 and downstream dependencies, and the prose is dense rather than padded. The trailing 'Args' block repeats cache_path and refresh_prices guidance already given in the Usage guidelines, which is mild redundancy, but the length is justified by genuinely complex behavior.

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 tool with substantial edge-case logic, the description covers file outputs, caching, error reporting, and card category exceptions, and an output schema exists so return values needn't be detailed. Nothing an agent needs to invoke it correctly appears 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%, yet all three parameters are explained in detail: input_path must be absolute, cache_path semantics are clarified (only skips for names already in a prior enriched CSV, not new cards), and refresh_prices scope is bounded to the price column only. This fully compensates for the absent schema descriptions.

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 ('Enrich a raw TCGPlayer Lorcana CSV export') and immediately names the six sibling tools that depend on its output, so the agent knows exactly what this tool does and why it matters. Distinguishes itself from siblings explicitly.

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 sequencing ('run this on every fresh TCGPlayer export before doing anything else'), plus when-to-use and when-not-to for both optional params: cache_path for re-exports, refresh_prices only to bring old enriched CSVs current and explicitly off for same-day fresh exports. Alternatives and exclusions are both covered.

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