Skip to main content
Glama

csb_card

Fetch Commander Spellbook card data using numeric ID to access specific card information for Magic: The Gathering gameplay and strategy.

Instructions

Fetch Commander Spellbook card by numeric ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • Registration of the 'csb_card' MCP tool using server.registerTool, including schema and inline handler function.
    server.registerTool( "csb_card", { title: "CSB: Get card", description: "Fetch Commander Spellbook card by numeric ID.", inputSchema: csbCardInput }, async ({ id }: { id: number }) => { const res = await CSB.getCard(id); return { structuredContent: res } as any; } );
  • Zod input schema definition for the csb_card tool: requires a positive integer 'id'.
    const csbCardInput = { id: z.number().int().positive() } as const;
  • Inline handler function for csb_card tool: calls CSB.getCard(id) and wraps result in structuredContent.
    async ({ id }: { id: number }) => { const res = await CSB.getCard(id); return { structuredContent: res } as any; }
  • CSB.getCard helper: fetches card data from CSB API endpoint /cards/{id} using getJson utility.
    getCard: (id: number) => getJson(`/cards/${id}`),

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