Skip to main content
Glama

get_order

Retrieve order details from SAP Commerce Cloud using user ID and order code to view specific purchase information.

Instructions

Get details of a specific order

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdYesUser ID or email
orderCodeYesOrder code/number

Implementation Reference

  • Dispatch handler case for the 'get_order' tool: validates userId and orderCode arguments, then calls hybrisClient.getOrder() to execute the tool logic.
    case 'get_order': result = await hybrisClient.getOrder( validateString(args, 'userId', true), validateString(args, 'orderCode', true) ); break;
  • src/index.ts:176-193 (registration)
    Registration of the 'get_order' tool in the tools list, including name, description, and input schema requiring userId and orderCode.
    { name: 'get_order', description: 'Get details of a specific order', inputSchema: { type: 'object', properties: { userId: { type: 'string', description: 'User ID or email', }, orderCode: { type: 'string', description: 'Order code/number', }, }, required: ['userId', 'orderCode'], }, },
  • Input schema definition for the get_order tool, specifying required string parameters userId and orderCode.
    inputSchema: { type: 'object', properties: { userId: { type: 'string', description: 'User ID or email', }, orderCode: { type: 'string', description: 'Order code/number', }, }, required: ['userId', 'orderCode'], }, },
  • HybrisClient.getOrder method: the core implementation that performs a REST API request to retrieve order details from the Hybris OCC endpoint.
    async getOrder(userId: string, orderCode: string): Promise<Order> { return this.request<Order>( `/rest/v2/${encodeURIComponent(this.config.baseSiteId!)}/users/${encodeURIComponent(userId)}/orders/${encodeURIComponent(orderCode)}?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