Skip to main content
Glama
hungryweb

CS-Cart MCP Server

by hungryweb

update_order_status

Change order status in CS-Cart stores to manage fulfillment workflows, with options to notify customers about updates.

Instructions

Update order status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
order_idYesOrder ID
statusYesNew order status (O=Open, P=Processed, C=Complete, F=Failed, D=Declined, B=Backordered, I=Incomplete)
notify_userNoWhether to notify the user about status change

Implementation Reference

  • The handler function that executes the tool logic: destructures the arguments to separate order_id and other data, makes a PUT request to the CS-Cart orders API endpoint, and returns the formatted JSON response.
    async updateOrderStatus(args) {
      const { order_id, ...orderData } = args;
      const result = await this.makeRequest('PUT', `/orders/${order_id}`, orderData);
      return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
    }
  • Input schema for the tool, defining required order_id and status (with enum), and optional notify_user boolean.
    inputSchema: {
      type: 'object',
      properties: {
        order_id: {
          type: 'number',
          description: 'Order ID',
        },
        status: {
          type: 'string',
          description: 'New order status (O=Open, P=Processed, C=Complete, F=Failed, D=Declined, B=Backordered, I=Incomplete)',
          enum: ['O', 'P', 'C', 'F', 'D', 'B', 'I'],
        },
        notify_user: {
          type: 'boolean',
          description: 'Whether to notify the user about status change',
          default: true,
        },
      },
      required: ['order_id', 'status'],
    },
  • src/index.js:301-324 (registration)
    Tool registration in the ListTools response, including name, description, and full input schema.
    {
      name: 'update_order_status',
      description: 'Update order status',
      inputSchema: {
        type: 'object',
        properties: {
          order_id: {
            type: 'number',
            description: 'Order ID',
          },
          status: {
            type: 'string',
            description: 'New order status (O=Open, P=Processed, C=Complete, F=Failed, D=Declined, B=Backordered, I=Incomplete)',
            enum: ['O', 'P', 'C', 'F', 'D', 'B', 'I'],
          },
          notify_user: {
            type: 'boolean',
            description: 'Whether to notify the user about status change',
            default: true,
          },
        },
        required: ['order_id', 'status'],
      },
    },
  • src/index.js:408-409 (registration)
    Dispatch/registration in the CallToolRequest switch statement that calls the handler method.
    case 'update_order_status':
      return await this.updateOrderStatus(args);

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/hungryweb/cscart-mcp'

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