Skip to main content
Glama
matthewdtowles

iwantmymtg-mcp

get_card

Retrieve full card details including current prices, rarity, type, and flavor name for a specific Magic: The Gathering printing by set code and collector number.

Instructions

Look up a specific card printing by set code and collector number. Returns full card detail including current prices, rarity, type, and flavor name. For broader catalog search use search_cards.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
setCodeYesSet code (e.g. 'lea').
setNumberYesCollector number within the set (e.g. '161'). String, not int - some sets use suffixes like '12a'.

Implementation Reference

  • The ToolDefinition object that registers 'get_card' with name, description, inputSchema, and handler.
    export const getCardTool = {
      name: "get_card",
      description:
        "Look up a specific card printing by set code and collector number. Returns full card detail including current prices, rarity, type, and flavor name. For broader catalog search use search_cards.",
      inputSchema: z.object(getCardInputSchema),
      handler: getCard,
    };
  • Input schema for get_card: requires setCode (string) and setNumber (string).
    export const getCardInputSchema = {
      setCode: z.string().describe("Set code (e.g. 'lea')."),
      setNumber: z.string().describe("Collector number within the set (e.g. '161'). String, not int - some sets use suffixes like '12a'."),
    };
  • The getCard async function that calls apiFetch with setCode and setNumber to look up a specific card printing.
    export async function getCard(input: { setCode: string; setNumber: string }) {
      return apiFetch({
        path: `/api/v1/cards/${encodeURIComponent(input.setCode)}/${encodeURIComponent(input.setNumber)}`,
      });
    }
  • src/tools/index.ts:3-3 (registration)
    Import of getCardTool from get-card.ts into the central tools registration.
    import { getCardTool, getCardPricesTool, getCardPriceHistoryTool } from "./get-card.js";
  • getCardTool added to the central tools array for export.
    getCardTool,
Behavior4/5

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

No annotations provided, so description carries full burden. It describes return data (current prices, rarity, type, flavor name) implying it is a read operation, but does not explicitly state it is non-destructive or idempotent. However, the description is sufficient for an agent to understand the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with no wasted words. First sentence states purpose and method; second provides return details and alternative. Perfectly front-loaded and efficient.

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 no output schema, the description explains return values adequately. It covers the key use case and provides an alternative. Minor gap: does not mention error handling or edge cases, but for a simple lookup tool, it is sufficiently complete.

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

Parameters3/5

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

Input schema has 100% coverage with descriptions for both parameters (setCode and setNumber). The description adds no additional parameter semantics beyond what the schema provides, so baseline score of 3 is appropriate.

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?

Description clearly states the action 'Look up a specific card printing by set code and collector number', identifies the resource, and distinguishes from sibling tool search_cards with 'For broader catalog search use search_cards'.

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?

Explicitly tells when to use (lookup specific card) and when not to (for broader search, use search_cards), providing clear context and an alternative.

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/matthewdtowles/iwantmymtg-mcp'

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