get_category
Retrieve category details from SAP Commerce Cloud using a category code to access product classifications and structure.
Instructions
Get details about a specific category
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| categoryCode | Yes | The category code |
Implementation Reference
- src/hybris-client.ts:447-451 (handler)The handler logic for 'get_category' in the Hybris client. It performs an API request to the OCC v2 endpoint to retrieve category details.
async getCategory(categoryCode: string): Promise<Category> { return this.request<Category>( `/occ/v2/${encodeURIComponent(this.config.baseSiteId!)}/categories/${encodeURIComponent(categoryCode)}` ); } - src/index.ts:149-161 (registration)Registration of the 'get_category' tool schema.
name: 'get_category', description: 'Get details about a specific category', inputSchema: { type: 'object', properties: { categoryCode: { type: 'string', description: 'The category code', }, }, required: ['categoryCode'], }, }, - src/index.ts:397-401 (handler)The tool call handler switch case that invokes the 'getCategory' method from the Hybris client.
case 'get_category': result = await hybrisClient.getCategory( validateString(args, 'categoryCode', true) ); break;