Skip to main content
Glama

get_product

Retrieve detailed product information from SAP Commerce Cloud using a product code or SKU to access specifications, inventory, and pricing data.

Instructions

Get detailed information about a specific product by its code

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
productCodeYesThe product code/SKU

Implementation Reference

  • src/index.ts:61-74 (registration)
    Registration of the 'get_product' tool in the tools list, including name, description, and input schema definition.
    { 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'], }, },
  • TypeScript interface defining the Product object structure 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 }[]; }
  • Handler case in the tool call switch statement that executes the get_product tool by calling HybrisClient.getProduct with the productCode argument.
    case 'get_product': result = await hybrisClient.getProduct(args?.productCode as string); break;
  • HybrisClient.getProduct method implementing the core logic: REST API call to OCC endpoint for product details.
    async getProduct(productCode: string): Promise<Product> { return this.request<Product>( `/rest/v2/${this.config.baseSiteId}/products/${productCode}?fields=FULL` ); }

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