Skip to main content
Glama
bitrefill

Bitrefill Search and Shop

Official
by bitrefill

categories

Retrieve the full product type and categories map to streamline product searches. Use this data to filter results effectively with the search tool for targeted shopping experiences.

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

  • Registration of the 'categories' tool, including inline input schema ({}), description, and handler function that returns the product categories hierarchy as formatted JSON.
    /** * Categories tool * Provides a map of product types and their associated categories. * @returns Complete product categories hierarchy */ 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 handler function for the 'categories' tool. It imports productCategories from constants and returns it as JSON string in text content.
    async () => { return { content: [ { type: "text" as const, text: JSON.stringify(productCategories, null, 2) } ] }; }
  • Supporting constant providing the full product categories map data used by the 'categories' tool handler.
    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 returned by the tool.
    * Product categories map schema */ export const ProductCategoriesMapSchema = z.record(z.array(z.string())); /** * Product types and their associated categories */ export type ProductCategoriesMap = z.infer<typeof ProductCategoriesMapSchema>;

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/bitrefill/bitrefill-mcp-server'

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