Skip to main content
Glama

get_card_by_set_and_number

Read-only

Retrieve detailed Magic: The Gathering Chinese card data by specifying the set code and collector number. Enhance applications or workflows with precise card information from sbwsz-mcp.

Instructions

通过系列代码和收集编号获取单张卡牌。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collector_numberYes收集编号,例如 '1'、'112'、'1a'
setYes系列代码,例如 'NEO'、'MOM'

Implementation Reference

  • The main handler function that constructs the API URL using the provided set and collector number, fetches the card data, and processes the response.
    async function handleGetCardBySetAndNumber(set: string, collectorNumber: string, config: z.infer<typeof configSchema>) {
      const url = `${config.apiUrl}/card/${encodeURIComponent(set)}/${encodeURIComponent(collectorNumber)}`;
      const response = await fetch(url);
      return handleSbwszResponse(response);
    }
  • Defines the tool schema including name, description, input parameters (set and collector_number), and annotations for the MCP tool.
    const GET_CARD_BY_SET_AND_NUMBER_TOOL: Tool = {
      name: "get_card_by_set_and_number",
      description:
        "通过系列代码和收集编号获取单张卡牌。",
      inputSchema: {
        type: "object",
        properties: {
          set: {
            type: "string",
            description: "系列代码,例如 'NEO'、'MOM'"
          },
          collector_number: {
            type: "string",
            description: "收集编号,例如 '1'、'112'、'1a'"
          }
        },
        required: ["set", "collector_number"]
      },
      annotations: {
        title: "由系列代码和收集编号获取单张卡牌",
        readOnlyHint: true,
        openWorldHint: true
      }
    };
  • index.ts:269-276 (registration)
    Registers the get_card_by_set_and_number tool in the array of available tools, which is returned by the ListToolsRequest handler.
    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)
    Registers the handler for ListToolsRequestSchema, which provides the list of tools including get_card_by_set_and_number.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: SBWSZ_TOOLS
    }));
  • index.ts:496-499 (registration)
    Dispatches calls to the get_card_by_set_and_number tool by invoking the handleGetCardBySetAndNumber function in the CallToolRequestSchema handler.
    case "get_card_by_set_and_number": {
      const { set, collector_number } = args as { set: string; collector_number: string };
      return await handleGetCardBySetAndNumber(set.toUpperCase(), collector_number, config);
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=true, indicating this is a safe read operation with potentially incomplete data. The description adds no behavioral context beyond what annotations provide, such as rate limits, authentication needs, or response format. However, it doesn't contradict annotations, so it meets the baseline for tools with good annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and every part of the sentence contributes to understanding the tool's function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (2 required parameters), high schema coverage (100%), and helpful annotations (readOnlyHint, openWorldHint), the description is adequate but minimal. It lacks output information (no output schema) and doesn't explain return values or error cases. For a simple lookup tool, it's complete enough but could be more informative.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear descriptions for both parameters ('collector_number' and 'set'). The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints. With high schema coverage, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '通过系列代码和收集编号获取单张卡牌' (Get a single card by set code and collector number). It specifies the verb '获取' (get/retrieve) and the resource '单张卡牌' (single card). However, it doesn't explicitly differentiate from sibling tools like 'get_set_cards' or 'search_cards', which likely retrieve multiple cards or use different search criteria.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'search_cards' or 'get_set_cards', nor does it specify prerequisites or exclusions. The usage is implied by the parameter requirements but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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