create_fulfillment_order
Create fulfillment orders in ShipStation by submitting order data as JSON to process shipments and manage order fulfillment.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| orderData | Yes | JSON string containing the fulfillment order data |
Implementation Reference
- src/tools/fulfillment-tools.js:35-48 (handler)The MCP tool handler for 'create_fulfillment_order'. Parses JSON orderData, calls shipStationClient.createFulfillmentOrder, and formats the response or error.handler: async ({ orderData }) => { try { const parsedData = JSON.parse(orderData); const result = await shipStationClient.createFulfillmentOrder(parsedData); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } }
- src/tools/fulfillment-tools.js:32-34 (schema)Zod input schema defining 'orderData' as a string containing JSON for the fulfillment order.schema: { orderData: z.string().describe("JSON string containing the fulfillment order data") },
- src/server.js:183-191 (registration)MCP server tool registration loop that includes fulfillmentTools (containing create_fulfillment_order) and calls server.tool for each tool....fulfillmentTools ].forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); });
- src/api-client.js:208-210 (helper)ShipStationClient helper method that performs the POST request to create a fulfillment order via the ShipStation API.async createFulfillmentOrder(data) { return this.request('POST', '/fulfillments/createorder', data); }