Skip to main content
Glama
gregario

onepiece-oracle

browse_sets

Browse One Piece TCG card sets to view all available collections or explore cards within specific sets like OP-01 or ROMANCE DAWN.

Instructions

Browse One Piece TCG sets. List all sets with card counts, or view cards in a specific set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
set_nameNoSet name or code to browse (e.g., "OP-01", "ROMANCE DAWN"). Omit to list all sets.
limitNoMax cards to show when browsing a set

Implementation Reference

  • Registration and handler implementation of the browse_sets tool.
    export function registerBrowseSets(server: McpServer): void {
      server.registerTool(
        'browse_sets',
        {
          description:
            'Browse One Piece TCG sets. List all sets with card counts, or view cards in a specific set.',
          inputSchema: {
            set_name: z.string().optional().describe('Set name or code to browse (e.g., "OP-01", "ROMANCE DAWN"). Omit to list all sets.'),
            limit: z.number().min(1).max(50).optional().default(20).describe('Max cards to show when browsing a set'),
          },
        },
        async ({ set_name, limit }) => {
          if (!set_name) {
            const sets = getSetList();
            const lines = [
              `# One Piece TCG Sets (${sets.length})`,
              '',
              '| Set | Cards |',
              '|-----|-------|',
              ...sets.map((s) => `| ${s.set} | ${s.count} |`),
            ];
            return {
              content: [{ type: 'text' as const, text: lines.join('\n') }],
            };
          }
    
          const cards = getCardsBySet(set_name);
          if (cards.length === 0) {
            return {
              isError: true,
              content: [
                {
                  type: 'text' as const,
                  text: `No cards found in set "${set_name}". Use browse_sets without arguments to see all available sets.`,
                },
              ],
            };
          }
    
          const shown = cards.slice(0, limit ?? 20);
          const lines = [
            `# ${set_name} (${cards.length} cards, showing ${shown.length})`,
            '',
            ...shown.map((c) => formatCardBrief(c)),
          ];
    
          if (cards.length > shown.length) {
            lines.push('', `*...and ${cards.length - shown.length} more. Use search_cards with set filter for full results.*`);
          }
    
          return {
            content: [{ type: 'text' as const, text: lines.join('\n') }],
          };
        },
      );
    }

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/gregario/onepiece-oracle'

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