list_fulfillments
Retrieve fulfillment records from ShipStation with filters for provider, order, status, and creation date to track order processing and shipping status.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fulfillmentProviderId | No | Filter by fulfillment provider ID | |
| orderId | No | Filter by order ID | |
| status | No | Filter by status | |
| createDateStart | No | Filter by creation date (start) | |
| createDateEnd | No | Filter by creation date (end) |
Implementation Reference
- src/tools/fulfillment-tools.js:15-27 (handler)Handler function for the list_fulfillments tool. Calls shipStationClient.getFulfillments with provided parameters and returns the JSON-stringified fulfillments or an error message.handler: async (params) => { try { const fulfillments = await shipStationClient.getFulfillments(params); return { content: [{ type: "text", text: JSON.stringify(fulfillments, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } }
- src/tools/fulfillment-tools.js:8-14 (schema)Zod-based input schema defining optional filtering parameters for the list_fulfillments tool.schema: { fulfillmentProviderId: z.number().optional().describe("Filter by fulfillment provider ID"), orderId: z.number().optional().describe("Filter by order ID"), status: z.string().optional().describe("Filter by status"), createDateStart: z.string().optional().describe("Filter by creation date (start)"), createDateEnd: z.string().optional().describe("Filter by creation date (end)") },
- src/tools/fulfillment-tools.js:5-28 (registration)Full tool definition object for list_fulfillments, including name, description, schema, and handler, within the fulfillmentTools array.{ name: "list_fulfillments", description: "List fulfillments with optional filtering parameters", schema: { fulfillmentProviderId: z.number().optional().describe("Filter by fulfillment provider ID"), orderId: z.number().optional().describe("Filter by order ID"), status: z.string().optional().describe("Filter by status"), createDateStart: z.string().optional().describe("Filter by creation date (start)"), createDateEnd: z.string().optional().describe("Filter by creation date (end)") }, handler: async (params) => { try { const fulfillments = await shipStationClient.getFulfillments(params); return { content: [{ type: "text", text: JSON.stringify(fulfillments, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } } },
- src/server.js:173-191 (registration)MCP server registration loop that includes fulfillmentTools (containing list_fulfillments) and calls server.tool for each tool.// Register all tools [ ...orderTools, ...shipmentTools, ...carrierTools, ...warehouseTools, ...productTools, ...customerTools, ...storeTools, ...webhookTools, ...fulfillmentTools ].forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); });