list_fulfillments
Filter and retrieve fulfillment data using specific criteria such as provider ID, order ID, status, or creation date range, tailored for efficient order management via the ShipStation API.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| createDateEnd | No | Filter by creation date (end) | |
| createDateStart | No | Filter by creation date (start) | |
| fulfillmentProviderId | No | Filter by fulfillment provider ID | |
| orderId | No | Filter by order ID | |
| status | No | Filter by status |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"createDateEnd": {
"description": "Filter by creation date (end)",
"type": "string"
},
"createDateStart": {
"description": "Filter by creation date (start)",
"type": "string"
},
"fulfillmentProviderId": {
"description": "Filter by fulfillment provider ID",
"type": "number"
},
"orderId": {
"description": "Filter by order ID",
"type": "number"
},
"status": {
"description": "Filter by status",
"type": "string"
}
},
"type": "object"
}
Implementation Reference
- src/tools/fulfillment-tools.js:15-27 (handler)The handler function that implements the list_fulfillments tool logic by calling shipStationClient.getFulfillments with provided parameters and returning the fulfillments as JSON 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 schema defining the optional input parameters for filtering fulfillments: fulfillmentProviderId, orderId, status, createDateStart, createDateEnd.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/server.js:174-191 (registration)Registers the list_fulfillments tool (included in fulfillmentTools) along with other tools to the MCP server using server.tool with name, schema, handler, and description.[ ...orderTools, ...shipmentTools, ...carrierTools, ...warehouseTools, ...productTools, ...customerTools, ...storeTools, ...webhookTools, ...fulfillmentTools ].forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); });