Skip to main content
Glama
bitrefill

Bitrefill Search and Shop

Official
by bitrefill

categories

Retrieve product categories to organize searches for cryptocurrency gift cards and mobile top-ups on Bitrefill.

Instructions

Get the full product type/categories map. It's suggested to use this tool to get the categories and then use the search tool to search for products in a specific category.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The inline handler function for the 'categories' tool, which returns a JSON-formatted string of the productCategories map.
    server.tool(
      "categories",
      "Get the full product type/categories map. It's suggested to use this tool to get the categories and then use the `search` tool to search for products in a specific category.",
      {},
      async () => {
        return {
          content: [
            { type: "text" as const, text: JSON.stringify(productCategories, null, 2) }
          ]
        };
      }
    );
  • Registration of the 'categories' tool within the registerToolHandlers function using server.tool.
    server.tool(
      "categories",
      "Get the full product type/categories map. It's suggested to use this tool to get the categories and then use the `search` tool to search for products in a specific category.",
      {},
      async () => {
        return {
          content: [
            { type: "text" as const, text: JSON.stringify(productCategories, null, 2) }
          ]
        };
      }
    );
  • The productCategories constant/map that provides the hierarchy of product types and categories, used by the 'categories' tool.
    export const productCategories: ProductCategoriesMap = {
      "giftcards": [
        "all-gift-cards",
        "apparel",
        "automobiles",
        "cruises",
        "ecommerce",
        "electronics",
        "entertainment",
        "experiences",
        "flights",
        "food",
        "food-delivery",
        "games",
        "gifts",
        "groceries",
        "health-beauty",
        "home",
        "multi-brand",
        "music",
        "other",
        "payment-cards",
        "pets",
        "pharmacy",
        "restaurants",
        "retail",
        "streaming",
        "top-products",
        "travel",
        "utility-bills",
        "voip"
      ],
      "refills": [
        "refill",
        "data",
        "pin",
        "bundles",
        "dth"
      ],
      "bills": [
        "all-bills",
        "auto-loans",
        "banking",
        "bill",
        "catalog-sales",
        "cemeteries-funerals",
        "club-membership",
        "commission-businesses",
        "credit-card",
        "education",
        "financial-services",
        "healthcare",
        "hoa-rent",
        "installment-payments",
        "insurance",
        "internet-cable-tv",
        "mortgages-home-equity",
        "mortgages-property-management",
        "phone",
        "press",
        "sanitation",
        "security-monitoring",
        "taxes",
        "water-electricity-gas"
      ],
      "esims": [
        "esim"
      ],
      "crypto-utils": [
        "bitcoin"
      ]
    };
  • Zod schema and TypeScript type definition for the product categories map data structure.
    export const ProductCategoriesMapSchema = z.record(z.array(z.string()));
    
    /**
     * Product types and their associated categories
     */
    export type ProductCategoriesMap = z.infer<typeof ProductCategoriesMapSchema>;
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/bitrefill/bitrefill-mcp-server'

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