Skip to main content
Glama

get_categories

Retrieve all product categories to filter ethical, origin-verified products. Browse Canadian, sustainable, vegan, and cruelty-free options from 30+ countries.

Instructions

List all supported product categories that can be used to filter products and brands.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handleGetCategories function executes the tool logic, returning CANONICAL_CATEGORIES array with count and usage instructions
    export function handleGetCategories() {
      return {
        categories: CANONICAL_CATEGORIES,
        total: CANONICAL_CATEGORIES.length,
        usage: 'Pass a category name in the "category" field when calling search_products or search_brands.'
      };
    }
  • The getCategoriesTool object defines the tool schema with name, description, and empty input schema
    export const getCategoriesTool = {
      name: 'get_categories',
      description: 'List all supported product categories that can be used to filter products and brands.',
      inputSchema: {
        type: 'object',
        properties: {}
      }
    };
  • src/index.js:59-68 (registration)
    Tool registration in the ListTools handler - getCategoriesTool is included in the tools array
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        searchProductsTool,
        searchBrandsTool,
        refineSearchTool,
        getValuesTool,
        getCategoriesTool,
        getCountriesTool
      ]
    }));
  • src/index.js:94-96 (registration)
    Tool dispatch case in CallTool handler - routes 'get_categories' calls to handleGetCategories
    case 'get_categories':
      result = handleGetCategories();
      break;
  • CANONICAL_CATEGORIES constant array containing the category values returned by the tool
    export const CANONICAL_CATEGORIES = [
      'Beauty', 'Personal Care', 'Baby', 'Health & Wellness', 'Supplements',
      'Home & Kitchen', 'Cleaning', 'Food & Grocery', 'Beverages', 'Pet Care',
      'Fashion', 'Accessories', 'Electronics', 'Office', 'Outdoors', 'Sports', 'Toys'
    ];
Behavior2/5

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

With no annotations provided, the description carries full behavioral burden but offers minimal disclosure beyond 'List all.' It does not clarify return format (IDs vs names vs objects), list size/volume, caching, or rate limits. The word 'supported' implies a fixed enum set, but this is thin behavioral context.

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?

Single sentence, front-loaded with the action verb, zero redundancy. Every word earns its place in explaining scope and utility.

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

Completeness3/5

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

For a simple lookup tool with no parameters, the description is minimally adequate. However, the absence of an output schema means the description should ideally describe the return structure (e.g., 'returns list of category objects with id and name'), which is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero parameters. Per scoring rules, 0 parameters establishes a baseline score of 4. The description correctly implies no filtering arguments are needed by stating 'List all.'

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

Purpose4/5

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

The description uses a specific verb ('List') and resource ('product categories') with clear scope ('all supported'). It implicitly distinguishes from sibling search tools by positioning the output as filter values for 'products and brands,' though it does not explicitly contrast with get_countries.

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?

It provides implied context by stating categories 'can be used to filter products and brands,' hinting at the workflow (use before searching). However, it lacks explicit when-to-use/when-not-to-use guidance or direct references to sibling tools like search_products.

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

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