Skip to main content
Glama

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
NameRequiredDescriptionDefault
categoryCodeYesThe category code

Implementation Reference

  • 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'],
      },
    },
  • 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;

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

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