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

csb_variants_search

Search Commander Spellbook combos by filtering with card usage, outcome production, or combo group identifiers to find specific Magic: The Gathering gameplay variants.

Instructions

Search Commander Spellbook variants (combos) by filters like uses/produces.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usesNoFilter variants that use this CSB card ID
producesNoFilter variants that produce this feature ID (e.g., Win the game = 2)
ofNoFilter variants that are of a specific combo ID group
limitNo
offsetNo

Implementation Reference

  • Registers the 'csb_variants_search' tool with McpServer, providing title, description, input schema, and the handler function that delegates to CSB.variants.
    server.registerTool(
        "csb_variants_search",
        {
            title: "CSB: Search variants",
            description: "Search Commander Spellbook variants (combos) by filters like uses/produces.",
            inputSchema: csbVariantsSearchInput
        },
        async ({ uses, produces, of, limit, offset }: { uses?: number; produces?: number; of?: number; limit?: number; offset?: number }) => {
            const res = await CSB.variants({ uses, produces, of, limit, offset });
            return { structuredContent: res } as any;
        }
    );
  • Zod input schema definition for the csb_variants_search tool parameters.
    const csbVariantsSearchInput = {
        uses: z.number().int().nonnegative().optional().describe("Filter variants that use this CSB card ID"),
        produces: z.number().int().nonnegative().optional().describe("Filter variants that produce this feature ID (e.g., Win the game = 2)"),
        of: z.number().int().nonnegative().optional().describe("Filter variants that are of a specific combo ID group"),
        limit: z.number().int().min(1).max(100).optional(),
        offset: z.number().int().min(0).optional()
    } as const;
  • The inline handler function for the tool, which calls CSB.variants with the input parameters and returns structured content.
    async ({ uses, produces, of, limit, offset }: { uses?: number; produces?: number; of?: number; limit?: number; offset?: number }) => {
        const res = await CSB.variants({ uses, produces, of, limit, offset });
        return { structuredContent: res } as any;
    }
  • CSB.variants helper function that makes an HTTP GET request to the Commander Spellbook API /variants endpoint with query parameters.
    variants: (opts: { uses?: number; produces?: number; of?: number; limit?: number; offset?: number }) =>
        getJson("/variants", opts),

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