Skip to main content
Glama

get_sets

Retrieve detailed information on all Magic: The Gathering card sets, organized by release date in descending order, to support applications or workflows needing comprehensive card data.

Instructions

返回所有MTG卡牌系列的完整数据,按发布日期降序排列

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main execution function for the 'get_sets' tool. It constructs the API URL for fetching all sets and calls the shared response handler.
    async function handleGetSets(config?: z.infer<typeof configSchema>) { const url = `${config?.apiUrl || BASE_URL}/sets`; const response = await fetch(url); return handleSbwszResponse(response); }
  • The Tool object defining the 'get_sets' tool, including its name, description, empty inputSchema (no parameters required), and annotations.
    const GET_SETS_TOOL: Tool = { name: "get_sets", description: "返回所有MTG卡牌系列的完整数据,按发布日期降序排列", inputSchema: { type: "object", properties: {}, required: [] }, annotations: { title: "获取所有卡牌系列", readOnlyHint: true, openWorldHint: true } };
  • index.ts:511-513 (registration)
    Registration of the 'get_sets' handler in the switch statement within the CallToolRequestSchema handler.
    case "get_sets": { return await handleGetSets(config); }
  • index.ts:269-276 (registration)
    Inclusion of GET_SETS_TOOL in the SBWSZ_TOOLS array, which is returned by listTools and used for tool discovery.
    const SBWSZ_TOOLS = [ GET_CARD_BY_SET_AND_NUMBER_TOOL, SEARCH_CARDS_TOOL, GET_SETS_TOOL, GET_SET_TOOL, GET_SET_CARDS_TOOL, HZLS_TOOL ] as const;
  • index.ts:487-489 (registration)
    MCP server registration for ListToolsRequestSchema, which provides the list of tools including 'get_sets'.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: SBWSZ_TOOLS }));

Other Tools

Related 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/lieyanqzu/sbwsz-mcp'

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