Skip to main content
Glama

get_categories

Retrieve the product catalog's category tree structure for navigation and organization purposes.

Instructions

Get the category tree from the product catalog

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that fetches the category tree from the Hybris OCC REST API endpoint and returns the subcategories array.
    async getCategories(): Promise<Category[]> { const result = await this.request<{ subcategories: Category[] }>( `/rest/v2/${encodeURIComponent(this.config.baseSiteId!)}/catalogs/${encodeURIComponent(this.config.catalogId!)}/${encodeURIComponent(this.config.catalogVersion!)}/categories` ); return result.subcategories || []; }
  • Tool registration including name, description, and empty input schema (no parameters required). Serves as both schema definition and registration in the tools list.
    { name: 'get_categories', description: 'Get the category tree from the product catalog', inputSchema: { type: 'object', properties: {}, }, },
  • Type definition for Category used in the getCategories return type.
    export interface Category { id: string; name: string; subcategories?: Category[]; }
  • src/index.ts:385-387 (registration)
    Dispatch/registration in the tool call switch statement that invokes the handler.
    case 'get_categories': result = await hybrisClient.getCategories(); break;

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/Emenowicz/hybris-mcp'

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