Skip to main content
Glama

get_orders

Retrieve order details for a specific user from SAP Commerce Cloud using their user ID or email address.

Instructions

Get orders for a specific user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdYesUser ID or email

Implementation Reference

  • Actual implementation of the getOrders tool logic in the Hybris client class.
    async getOrders(userId: string): Promise<{ orders: Order[] }> {
      return this.request<{ orders: Order[] }>(
        `/occ/v2/${encodeURIComponent(this.config.baseSiteId!)}/users/${encodeURIComponent(userId)}/orders?fields=FULL`
      );
    }
  • src/index.ts:162-175 (registration)
    Registration of the get_orders tool with its input schema.
    {
      name: 'get_orders',
      description: 'Get orders for a specific user',
      inputSchema: {
        type: 'object',
        properties: {
          userId: {
            type: 'string',
            description: 'User ID or email',
          },
        },
        required: ['userId'],
      },
    },
  • The handler case in index.ts that calls the hybrisClient for the get_orders tool.
    case 'get_orders':
      result = await hybrisClient.getOrders(
        validateString(args, 'userId', true)
      );
      break;

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/mcieunic/hybris-mcp-main'

If you have feedback or need assistance with the MCP directory API, please join our Discord server