Skip to main content
Glama
hungryweb

CS-Cart MCP Server

by hungryweb

get_order

Retrieve detailed order information from CS-Cart stores by providing an order ID to view customer details, items, and status.

Instructions

Get detailed information about a specific order

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
order_idYesOrder ID

Implementation Reference

  • The main handler function that executes the get_order tool by making a GET request to the CS-Cart API endpoint for the specific order ID.
    async getOrder(args) { const result = await this.makeRequest('GET', `/orders/${args.order_id}`); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
  • The input schema and metadata for the get_order tool, defining it requires an order_id parameter.
    { name: 'get_order', description: 'Get detailed information about a specific order', inputSchema: { type: 'object', properties: { order_id: { type: 'number', description: 'Order ID', }, }, required: ['order_id'], }, },
  • src/index.js:406-407 (registration)
    Registration in the CallToolRequestHandler switch statement that dispatches to the getOrder handler.
    case 'get_order': return await this.getOrder(args);
  • src/index.js:288-300 (registration)
    Tool registration in the ListToolsRequestHandler response, listing the get_order tool with its schema.
    name: 'get_order', description: 'Get detailed information about a specific order', inputSchema: { type: 'object', properties: { order_id: { type: 'number', description: 'Order ID', }, }, required: ['order_id'], }, },
  • Shared helper method used by getOrder to make authenticated API requests to CS-Cart.
    async makeRequest(method, endpoint, data = null) { const config = { method, url: `${process.env.CSCART_API_URL}${endpoint}`, headers: { 'Content-Type': 'application/json', 'Authorization': `Basic ${Buffer.from(`${process.env.CSCART_API_EMAIL}:${process.env.CSCART_API_KEY}`).toString('base64')}`, }, }; if (data) { config.data = data; } const response = await axios(config); return response.data; }

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