Skip to main content
Glama

enrich_csv

Enrich a raw TCGPlayer Lorcana CSV with full card data, adding ink color, cost, type, stats, and abilities. Outputs enriched and dreamborn-ready CSVs for collection analysis and deck building.

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. 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cache_pathNo
input_pathYes
refresh_pricesNo

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?

With no annotations provided, the description carries the full behavioral burden and does so thoroughly: it discloses that the tool writes two new files next to the input and never modifies input_path, describes API sources and 24h disk caching, explains promo-card handling, reports fill rates and unmatched cards, and clarifies cache_path and refresh_prices semantics.

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?

The description is front-loaded with purpose and workflow, and most detail is justified by the tool's complexity. It is somewhat long and repeats the write-two-files behavior in two places, but the information remains organized and useful rather than padded.

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?

Given the tool's complexity, the lack of annotations, and the 0% schema coverage, the description is complete enough for correct invocation. It covers inputs, side effects, dependency ordering, caching behavior, price refreshes, output filenames, and edge cases; the presence of an output schema means return-value details need not be expanded further.

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?

The schema has 0% description coverage, so the description must compensate, and it fully documents all three parameters. It gives the expected format for input_path, explains that cache_path only skips re-fetching names already present in a prior enriched CSV, and states exactly what refresh_prices overwrites and when to use it.

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?

The description states a precise verb-and-resource purpose: enriching a raw TCGPlayer Lorcana CSV export with full card data. It explicitly names the dependent sibling tools that require its output, so an agent can immediately distinguish it from other collection tools.

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?

It explicitly says to run this on every fresh TCGPlayer export before doing anything else, and names the exact situations for optional parameters: use cache_path on re-export for speed, use refresh_prices only to refresh an existing enriched CSV's prices, and leave refresh_prices off for same-day fresh exports. It effectively covers when to use the tool and when not to enable specific behavior.

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