Skip to main content
Glama

get_product

Retrieve detailed product information by entering the product code or SKU. This tool fetches specific product data from SAP Commerce Cloud (Hybris) for management and analysis purposes.

Instructions

Get detailed information about a specific product by its code

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
productCodeYesThe product code/SKU

Implementation Reference

  • Core handler function that executes the get_product tool logic by making a REST API request to the Hybris OCC endpoint to retrieve product details by code.
    async getProduct(productCode: string): Promise<Product> { return this.request<Product>( `/rest/v2/${encodeURIComponent(this.config.baseSiteId!)}/products/${encodeURIComponent(productCode)}?fields=FULL` ); }
  • JSON input schema defining the required 'productCode' parameter for the get_product tool.
    inputSchema: { type: 'object', properties: { productCode: { type: 'string', description: 'The product code/SKU', }, }, required: ['productCode'], },
  • src/index.ts:126-139 (registration)
    Tool registration object added to the tools list returned by listTools, including name, description, and schema.
    { name: 'get_product', description: 'Get detailed information about a specific product by its code', inputSchema: { type: 'object', properties: { productCode: { type: 'string', description: 'The product code/SKU', }, }, required: ['productCode'], }, },
  • MCP request handler switch case that validates input arguments and dispatches to the HybrisClient.getProduct method.
    case 'get_product': result = await hybrisClient.getProduct( validateString(args, 'productCode', true) ); break;
  • TypeScript interface defining the structure of the Product object returned by the get_product tool.
    export interface Product { code: string; name: string; description?: string; price?: { value: number; currencyIso: string; formattedValue: string; }; stock?: { stockLevel: number; stockLevelStatus: string; }; categories?: { code: string; name: string }[]; images?: { url: string; format: string }[]; }

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