Skip to main content
Glama

get_order

Retrieve specific order details from SAP Commerce Cloud using user ID and order code for tracking and management purposes.

Instructions

Get details of a specific order

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdYesUser ID or email
orderCodeYesOrder code/number

Implementation Reference

  • Core implementation of get_order: fetches specific order details for a user via Hybris OCC REST API.
    async getOrder(userId: string, orderCode: string): Promise<Order> { return this.request<Order>( `/rest/v2/${this.config.baseSiteId}/users/${userId}/orders/${orderCode}?fields=FULL` ); }
  • MCP tool handler: switch case that invokes HybrisClient.getOrder with tool arguments.
    case 'get_order': result = await hybrisClient.getOrder( args?.userId as string, args?.orderCode as string ); break;
  • src/index.ts:111-128 (registration)
    Tool registration in the tools array, including name, description, and input schema.
    { 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'], }, },
  • Type definition for Order output structure.
    export interface Order { code: string; status: string; created: string; totalPrice: { value: number; currencyIso: string; formattedValue: string; }; entries: OrderEntry[]; }
  • Input schema for tool validation: requires 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'], },

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