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

list_sets

Retrieve a complete list of Magic: The Gathering card sets from Scryfall's database to browse available expansions and collections.

Instructions

List all sets available on Scryfall.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The inline handler function for the 'list_sets' tool. It calls Scryfall.listSets() to fetch the data and returns it formatted as a ToolResult with JSON stringified text content.
    async (): Promise<ToolResult> => {
        const data: unknown = await Scryfall.listSets();
        return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] } as any;
    }
  • Registration of the 'list_sets' MCP tool using server.registerTool(). Includes tool name, description (no input schema since zero-arg), and the inline handler function.
    server.registerTool(
        "list_sets",
        {
            description: "List all sets available on Scryfall.",
            // No input schema for zero-arg tools
        } as any,
        async (): Promise<ToolResult> => {
            const data: unknown = await Scryfall.listSets();
            return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] } as any;
        }
    );
  • Helper method in the Scryfall API wrapper object that fetches the list of all sets from the Scryfall API endpoint "/sets" using getJson.
    listSets: () => getJson("/sets"),

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