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
| Name | Required | Description | Default |
|---|---|---|---|
| uses | No | Filter variants that use this CSB card ID | |
| produces | No | Filter variants that produce this feature ID (e.g., Win the game = 2) | |
| of | No | Filter variants that are of a specific combo ID group | |
| limit | No | ||
| offset | No |
Implementation Reference
- src/mcp-server.ts:466-477 (registration)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; } );
- src/mcp-server.ts:459-465 (schema)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;
- src/mcp-server.ts:473-476 (handler)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; }
- src/csb.ts:113-114 (helper)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),