Skip to main content
Glama

get_category

Retrieve category details from SAP Commerce Cloud using a category code to access product organization information.

Instructions

Get details about a specific category

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryCodeYesThe category code

Implementation Reference

  • The core handler function that executes the tool logic by making an API request to the Hybris OCC endpoint to fetch category details.
    async getCategory(categoryCode: string): Promise<Category> { return this.request<Category>( `/rest/v2/${this.config.baseSiteId}/catalogs/${this.config.catalogId}/${this.config.catalogVersion}/categories/${categoryCode}` ); }
  • src/index.ts:83-96 (registration)
    Registers the 'get_category' tool in the MCP tools list with name, description, and input schema.
    { name: 'get_category', description: 'Get details about a specific category', inputSchema: { type: 'object', properties: { categoryCode: { type: 'string', description: 'The category code', }, }, required: ['categoryCode'], }, },
  • Defines the input schema for the 'get_category' tool, requiring a categoryCode string.
    inputSchema: { type: 'object', properties: { categoryCode: { type: 'string', description: 'The category code', }, }, required: ['categoryCode'], },
  • The dispatching handler in the main CallToolRequestSchema that invokes the getCategory method.
    case 'get_category': result = await hybrisClient.getCategory(args?.categoryCode as string); break;
  • TypeScript interface defining the expected output structure for a Category.
    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