hold_order_until
Delay processing of a specific order in ShipStation by specifying the order ID and a hold date using this tool. Manage order workflows efficiently.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| holdUntilDate | Yes | Date to hold until (YYYY-MM-DD) | |
| orderId | Yes | Order ID to hold |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"holdUntilDate": {
"description": "Date to hold until (YYYY-MM-DD)",
"type": "string"
},
"orderId": {
"description": "Order ID to hold",
"type": "number"
}
},
"required": [
"orderId",
"holdUntilDate"
],
"type": "object"
}
Implementation Reference
- src/tools/order-tools.js:192-204 (handler)The handler function that executes the 'hold_order_until' tool logic, invoking the ShipStation API client and formatting the response.handler: async ({ orderId, holdUntilDate }) => { try { const result = await shipStationClient.holdOrderUntil({ orderId, holdUntilDate }); 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:188-191 (schema)Zod schema defining the input parameters for the tool: orderId (number) and holdUntilDate (string in YYYY-MM-DD format).schema: { orderId: z.number().describe("Order ID to hold"), holdUntilDate: z.string().describe("Date to hold until (YYYY-MM-DD)") },
- src/server.js:184-191 (registration)Registration loop in the MCP server that adds the 'hold_order_until' tool (from orderTools) using server.tool().].forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); });
- src/api-client.js:80-82 (helper)ShipStationClient method that performs the actual API POST request to the '/orders/holduntil' endpoint.async holdOrderUntil(data) { return this.request('POST', '/orders/holduntil', data); }