Skip to main content
Glama
latte-chan
by latte-chan

get_card

Retrieve Magic: The Gathering card data by Scryfall UUID or card name using exact or fuzzy matching.

Instructions

Get a single card by Scryfall UUID or by name (exact/fuzzy).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNo
nameNo
fuzzyNoIf true, uses fuzzy name match

Implementation Reference

  • Handler function that executes the 'get_card' tool: fetches card data from Scryfall by ID (exact) or name (exact/fuzzy).
    async ({ id, name, fuzzy }: { id?: string; name?: string; fuzzy?: boolean }): Promise<ToolResult> => {
        const data: unknown = id
            ? await Scryfall.getCardById(id)
            : await Scryfall.getCardNamed(name as string, Boolean(fuzzy));
        return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] } as any;
    }
  • Input schema (Zod) defining parameters for the 'get_card' tool: optional id (UUID), name, and fuzzy flag.
    const getCardParamsShape = {
        id: z.string().uuid().optional(),
        name: z.string().optional(),
        fuzzy: z.boolean().optional().describe("If true, uses fuzzy name match")
    } as const;
  • Registration of the 'get_card' tool with MCP server, including description, schema, and handler.
    server.registerTool(
        "get_card",
        {
            description: "Get a single card by Scryfall UUID or by name (exact/fuzzy).",
            inputSchema: getCardParamsShape
        },
        async ({ id, name, fuzzy }: { id?: string; name?: string; fuzzy?: boolean }): Promise<ToolResult> => {
            const data: unknown = id
                ? await Scryfall.getCardById(id)
                : await Scryfall.getCardNamed(name as string, Boolean(fuzzy));
            return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] } as any;
        }
    );
  • Scryfall API helper: fetches card details by encoded ID.
    getCardById: (id: string) => getJson(`/cards/${encodeURIComponent(id)}`),
  • Scryfall API helper: fetches card by name, with optional fuzzy matching.
    getCardNamed: (name: string, fuzzy = false) =>
        getJson("/cards/named", fuzzy ? { fuzzy: name } : { exact: name }),
Behavior2/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 of behavioral disclosure. It states the tool retrieves a single card but doesn't mention error handling (e.g., what happens if no card is found), performance characteristics, rate limits, or authentication requirements. For a read operation with no annotation coverage, this leaves significant gaps in understanding 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?

The description is a single, well-structured sentence that efficiently conveys the core functionality. It's front-loaded with the main purpose and includes essential details about lookup methods without unnecessary elaboration. Every word earns its place.

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

Completeness3/5

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

Given the tool's moderate complexity (3 parameters, no annotations, no output schema), the description is minimally adequate. It covers the basic purpose and parameter relationships but lacks details on error cases, return format, or usage context. For a tool that likely interacts with a card database, more behavioral context would be helpful.

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?

Schema description coverage is 33% (only the 'fuzzy' parameter has a description). The description adds value by explaining that 'name' supports both exact and fuzzy matching, which clarifies the relationship between the 'name' and 'fuzzy' parameters. However, it doesn't explain the 'id' parameter's UUID format or provide examples of name matching, leaving some semantic gaps.

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 clearly states the tool's purpose: 'Get a single card by Scryfall UUID or by name (exact/fuzzy).' It specifies the verb ('Get'), resource ('a single card'), and two lookup methods (UUID or name matching). However, it doesn't explicitly differentiate from sibling tools like 'csb_card' or 'search_cards' which might have overlapping functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions two lookup methods but doesn't indicate which to prefer, when fuzzy matching is appropriate, or how this differs from sibling tools like 'csb_card' or 'search_cards' that might retrieve cards differently.

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/latte-chan/scryfall-connector'

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