Skip to main content
Glama

count_cards

Count Disney Lorcana cards by applying filters such as color, cost, stats, keyword, and card type to answer queries like how many ruby cards or evasive characters exist.

Instructions

Count cards matching the given filters. Use this for questions like 'how many ruby cards are there?' or 'how many evasive characters?'. Supports stat ranges: min_attack/max_attack, min_defence/max_defence, min_cost/max_cost. Use keyword to filter by Lorcana keyword (Bodyguard, Challenger, Evasive, Reckless, Resist, Rush, Shift, Singer, Sing Together, Support, Vanish, Voiceless, Ward, etc.) — matches against the structured ability list. Use body_text for value-specific keyword queries like 'Singer 5' or 'Resist +2', or for non-keyword phrases like 'gain 2 lore'. Use lore/min_lore/max_lore to filter by lore value. Use card_type to filter by card type: Character, Action, Item, Song, or Location. Use set_code to filter by set number (e.g. '1' for The First Chapter). Use set_name to filter by set name as a case-insensitive substring (e.g. 'Wilds Unknown', 'frozen') — preferred when the user names a set in plain English. Color must be one of: ruby, sapphire, emerald, amber, amethyst, steel.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
costNo
loreNo
nameNo
colorNo
traitNo
rarityNo
inkwellNo
keywordNo
max_costNo
max_loreNo
min_costNo
min_loreNo
set_codeNo
set_nameNo
body_textNo
card_typeNo
max_attackNo
min_attackNo
max_defenceNo
min_defenceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses filter behavior (e.g., case-insensitive substring for set_name, matches against structured ability list for keyword) and stat ranges. Some behavioral details like AND/OR logic for multiple filters are missing but overall it is transparent.

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 the purpose and usage examples. It is organized by parameter groups but could be more concise, especially the list of keywords. Most sentences add value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of 20 parameters and no annotations, the description covers many filter options and their semantics. The presence of an output schema reduces the need to explain return values. However, it lacks explanation of how multiple filters combine (e.g., AND logic) and does not mention edge cases like no matches.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains many parameters (keyword, body_text, lore, card_type, set_code, set_name, color, stat ranges) but fails to explain several others like name, trait, rarity, inkwell, and the single cost parameter. With 20 parameters, coverage is insufficient.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Count cards matching the given filters' and provides examples like 'how many ruby cards are there?' which clearly conveys the purpose. It does not explicitly differentiate from sibling tools like search_cards, but the verb 'count' distinguishes it effectively.

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 description gives explicit examples of questions to use the tool for ('how many ruby cards are there?') and explains when to use keyword vs body_text. However, it does not mention when not to use this tool or suggest alternative tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/danielenricocahall/lorcana-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server