get_order
Retrieve detailed information about a specific order in CS-Cart by providing the order ID. Useful for tracking, analysis, and managing e-commerce transactions.
Instructions
Get detailed information about a specific order
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order_id | Yes | Order ID |
Implementation Reference
- src/index.js:519-522 (handler)The handler function that executes the 'get_order' tool logic by making a GET request to the CS-Cart API endpoint `/orders/{order_id}` and returning the JSON-formatted result.async getOrder(args) { const result = await this.makeRequest('GET', `/orders/${args.order_id}`); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- src/index.js:290-299 (schema)Input schema for the 'get_order' tool, defining the required 'order_id' parameter as a number.inputSchema: { type: 'object', properties: { order_id: { type: 'number', description: 'Order ID', }, }, required: ['order_id'], },
- src/index.js:287-300 (registration)Registration of the 'get_order' tool in the ListTools response, including name, description, and input 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'], }, },
- src/index.js:406-407 (registration)Dispatch registration in the CallToolRequestSchema switch statement that maps the 'get_order' tool name to the getOrder handler method.case 'get_order': return await this.getOrder(args);