Skip to main content
Glama

search_tcgplayer

Find current trading card prices on TCGPlayer for Magic, Pokémon, Yu-Gi-Oh!, and other collectible card games. Get market prices, lowest listings, and card images to make informed purchasing decisions.

Instructions

Search trading card prices from TCGPlayer. Covers Magic the Gathering, Pokémon, Yu-Gi-Oh!, Lorcana, and more. Returns market prices, lowest prices, listing counts, and card images.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesCard name or search term (e.g. "charizard", "black lotus")
limitNoNumber of results to return (max 50)

Implementation Reference

  • The 'search_tcgplayer' tool definition and handler implementation. It uses a Zod schema for input validation and fetches data from a backend service.
    server.tool(
      "search_tcgplayer",
      "Search trading card prices from TCGPlayer. Covers Magic the Gathering, Pokémon, Yu-Gi-Oh!, Lorcana, and more. Returns market prices, lowest prices, listing counts, and card images.",
      {
        query: z
          .string()
          .describe('Card name or search term (e.g. "charizard", "black lotus")'),
        limit: z
          .number()
          .int()
          .min(1)
          .max(50)
          .default(20)
          .describe("Number of results to return (max 50)"),
      },
      async ({ query, limit }) => {
        const url = `${BACKEND_URL}/tcgplayer/search?query=${encodeURIComponent(query)}&limit=${limit}`;
        const res = await fetch(url);
        const data = await res.json();
    
        if (!data.success) {
          return {
            isError: true,
            content: [{ type: "text", text: `Error: ${data.error}` }],
          };
        }
    
        return {
          content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
        };
      }
    );

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/lulzasaur9192/marketplace-search-mcp'

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