Skip to main content
Glama
Emenowicz

Hybris MCP Server

by Emenowicz

get_category

Retrieve category details from SAP Commerce Cloud using a category code to access product classification information for management tasks.

Instructions

Get details about a specific category

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryCodeYesThe category code

Implementation Reference

  • The handler logic for the 'get_category' tool within the main CallToolRequestSchema dispatcher switch statement. It validates the required 'categoryCode' input and delegates to hybrisClient.getCategory.
    case 'get_category':
      result = await hybrisClient.getCategory(
        validateString(args, 'categoryCode', true)
      );
      break;
  • src/index.ts:148-161 (registration)
    Tool registration entry in the 'tools' array, used by ListToolsRequestSchema handler. Defines the tool name, description, and input schema for MCP tool discovery.
    {
      name: 'get_category',
      description: 'Get details about a specific category',
      inputSchema: {
        type: 'object',
        properties: {
          categoryCode: {
            type: 'string',
            description: 'The category code',
          },
        },
        required: ['categoryCode'],
      },
    },
  • Input schema definition for the 'get_category' tool, specifying the required 'categoryCode' string parameter.
    inputSchema: {
      type: 'object',
      properties: {
        categoryCode: {
          type: 'string',
          description: 'The category code',
        },
      },
      required: ['categoryCode'],
    },
  • Supporting method in HybrisClient that performs the actual REST API request to fetch category details using the OCC endpoints.
    async getCategory(categoryCode: string): Promise<Category> {
      return this.request<Category>(
        `/rest/v2/${encodeURIComponent(this.config.baseSiteId!)}/catalogs/${encodeURIComponent(this.config.catalogId!)}/${encodeURIComponent(this.config.catalogVersion!)}/categories/${encodeURIComponent(categoryCode)}`
      );
    }

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