delete_order
Remove orders from ShipStation by specifying the order ID to manage order data and maintain accurate records.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| orderId | Yes | Order ID to delete |
Implementation Reference
- src/tools/order-tools.js:109-121 (handler)The MCP tool handler function for 'delete_order' that invokes the ShipStation API client to delete the order and returns the formatted result or error.handler: async ({ orderId }) => { try { const result = await shipStationClient.deleteOrder(orderId); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } }
- src/tools/order-tools.js:106-108 (schema)Zod input schema defining the required 'orderId' parameter as a number.schema: { orderId: z.number().describe("Order ID to delete") },
- src/server.js:184-191 (registration)Bulk registration of all tools, including 'delete_order', to the MCP server using server.tool() in a loop over imported tool arrays.].forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); });
- src/api-client.js:64-66 (helper)ShipStationClient helper method that performs the actual DELETE API request to /orders/{orderId}.async deleteOrder(orderId) { return this.request('DELETE', `/orders/${orderId}`); }