Skip to main content
Glama

get_categories

Retrieve the category tree structure from SAP Commerce Cloud product catalogs to organize and navigate products.

Instructions

Get the category tree from the product catalog

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function that makes an API request to the Hybris OCC endpoint to fetch the top-level categories and returns them as Category[].
    async getCategories(): Promise<Category[]> { const result = await this.request<{ subcategories: Category[] }>( `/rest/v2/${this.config.baseSiteId}/catalogs/${this.config.catalogId}/${this.config.catalogVersion}/categories` ); return result.subcategories || []; }
  • Tool registration including name, description, and input schema (no required parameters). Serves as both registration and schema definition.
    { name: 'get_categories', description: 'Get the category tree from the product catalog', inputSchema: { type: 'object', properties: {}, }, },
  • src/index.ts:305-307 (registration)
    Dispatch handler in the switch statement that calls the getCategories method on the HybrisClient instance.
    case 'get_categories': result = await hybrisClient.getCategories(); break;
  • TypeScript interface defining the structure of a Category object used in the tool's output.
    export interface Category { id: string; name: string; subcategories?: Category[]; }

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