get_order
Retrieve specific order details from SAP Commerce Cloud using user ID and order code to track purchases and manage customer transactions.
Instructions
Get details of a specific order
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | User ID or email | |
| orderCode | Yes | Order code/number |
Implementation Reference
- src/hybris-client.ts:459-463 (handler)The implementation of the getOrder tool, which performs an API request to fetch order details.
async getOrder(userId: string, orderCode: string): Promise<Order> { return this.request<Order>( `/occ/v2/${encodeURIComponent(this.config.baseSiteId!)}/users/${encodeURIComponent(userId)}/orders/${encodeURIComponent(orderCode)}?fields=FULL` ); } - src/index.ts:177-193 (registration)Tool definition and registration for 'get_order' in the MCP server index.
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'], }, },