Skip to main content
Glama

list_shipments

Retrieve shipment data from ShipBob's fulfillment system with filtering options for order ID, date ranges, and pagination controls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number for pagination
limitNoNumber of shipments per page
orderIdNoFilter by order ID
startDateNoStart date for filtering (YYYY-MM-DD)
endDateNoEnd date for filtering (YYYY-MM-DD)

Implementation Reference

  • The handler function executes the tool logic by calling shipbobClient.getShipments with pagination and filter parameters, formats the response as JSON, and handles errors.
    handler: async ({ page, limit, orderId, startDate, endDate }) => { try { const params = { page, limit, orderId, startDate, endDate }; const shipments = await shipbobClient.getShipments(params); return { content: [{ type: "text", text: JSON.stringify(shipments, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error listing shipments: ${error.message}` }], isError: true }; } }
  • Zod schema defining the input parameters for the list_shipments tool: optional page, limit, orderId, startDate, endDate.
    schema: { page: z.number().optional().describe("Page number for pagination"), limit: z.number().optional().describe("Number of shipments per page"), orderId: z.string().optional().describe("Filter by order ID"), startDate: z.string().optional().describe("Start date for filtering (YYYY-MM-DD)"), endDate: z.string().optional().describe("End date for filtering (YYYY-MM-DD)") },
  • The tool 'list_shipments' is registered as part of the exported fulfillmentTools array.
    { name: "list_shipments", description: "List shipments in your ShipBob account", schema: { page: z.number().optional().describe("Page number for pagination"), limit: z.number().optional().describe("Number of shipments per page"), orderId: z.string().optional().describe("Filter by order ID"), startDate: z.string().optional().describe("Start date for filtering (YYYY-MM-DD)"), endDate: z.string().optional().describe("End date for filtering (YYYY-MM-DD)") }, handler: async ({ page, limit, orderId, startDate, endDate }) => { try { const params = { page, limit, orderId, startDate, endDate }; const shipments = await shipbobClient.getShipments(params); return { content: [{ type: "text", text: JSON.stringify(shipments, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error listing shipments: ${error.message}` }], isError: true }; } } },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mattcoatsworth/shipbob-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server