Skip to main content
Glama
matthewdtowles

iwantmymtg-mcp

get_card_prices

Retrieve current normal and foil prices for a specific Magic: The Gathering card printing by providing set code and collector number.

Instructions

Get current normal and foil prices for a specific card printing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
setCodeYesSet code (e.g. 'lea').
setNumberYesCollector number within the set (e.g. '161'). String, not int - some sets use suffixes like '12a'.

Implementation Reference

  • The getCardPricesTool object defines the 'get_card_prices' tool with its name, description, inputSchema, and async handler. The handler calls apiFetch to GET /api/v1/cards/{setCode}/{setNumber}/prices.
    export const getCardPricesTool = {
      name: "get_card_prices",
      description: "Get current normal and foil prices for a specific card printing.",
      inputSchema: z.object(getCardInputSchema),
      handler: async (input: { setCode: string; setNumber: string }) =>
        apiFetch({
          path: `/api/v1/cards/${encodeURIComponent(input.setCode)}/${encodeURIComponent(input.setNumber)}/prices`,
        }),
    };
  • The shared getCardInputSchema defines the two required inputs: setCode (string) and setNumber (string), used as the inputSchema for get_card_prices.
    export const getCardInputSchema = {
      setCode: z.string().describe("Set code (e.g. 'lea')."),
      setNumber: z.string().describe("Collector number within the set (e.g. '161'). String, not int - some sets use suffixes like '12a'."),
    };
  • The getCardPricesTool is added to the tools array, registering it as an available MCP tool alongside getCardTool and getCardPriceHistoryTool.
    export const tools: ToolDefinition[] = [
      // Read-only (no auth)
      searchCardsTool,
      getCardTool,
      getCardPricesTool,
      getCardPriceHistoryTool,
  • The toolsByName lookup map is built from the tools array, enabling dynamic dispatch by tool name in the server handler.
    export const toolsByName: Record<string, ToolDefinition> = Object.fromEntries(
      tools.map((t) => [t.name, t]),
    );
Behavior2/5

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

No annotations are provided, and the description does not disclose any behavioral traits beyond the basic read operation. It does not mention authentication, rate limits, or data freshness, which would be valuable for a price lookup tool.

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 concise sentence with no unnecessary words, front-loading the key action and resource.

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

Completeness2/5

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

With no output schema and no annotations, the description lacks context on return format, data freshness, or potential errors. For a simple tool it may suffice, but more completeness would help the agent understand what to expect.

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?

The input schema already has 100% description coverage with clear explanations for setCode and setNumber. The tool description adds no additional meaning beyond what the schema provides, so baseline 3 is appropriate.

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

Purpose5/5

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

The description clearly states the tool retrieves current normal and foil prices for a specific card printing, using the verb 'Get' and specifying the resource. It distinguishes from siblings like get_card_price_history (historical prices) and get_card (card details).

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

Usage Guidelines3/5

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

The description implies usage for fetching current prices but lacks explicit guidance on when to use this tool over siblings like get_card_price_history or get_card_performance. No exclusions or alternatives are mentioned.

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

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/matthewdtowles/iwantmymtg-mcp'

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