Skip to main content
Glama

get_shipping_report

Generate shipping reports from ShipBob's fulfillment API by specifying date ranges and optional fulfillment center filters to track delivery performance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
startDateYesStart date for the report (YYYY-MM-DD)
endDateYesEnd date for the report (YYYY-MM-DD)
fulfillmentCenterIdNoFilter by fulfillment center ID

Implementation Reference

  • The main handler function for the 'get_shipping_report' tool. It constructs parameters, calls the ShipBob API via shipbobClient, formats the report as JSON, or returns an error message.
    handler: async ({ startDate, endDate, fulfillmentCenterId }) => { try { const params = { startDate, endDate, fulfillmentCenterId }; const report = await shipbobClient.getShippingReport(params); return { content: [{ type: "text", text: JSON.stringify(report, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving shipping report: ${error.message}` }], isError: true }; } }
  • Input schema using Zod for validating parameters: required startDate and endDate (YYYY-MM-DD), optional fulfillmentCenterId.
    schema: { startDate: z.string().describe("Start date for the report (YYYY-MM-DD)"), endDate: z.string().describe("End date for the report (YYYY-MM-DD)"), fulfillmentCenterId: z.string().optional().describe("Filter by fulfillment center ID") },
  • The complete tool definition object for 'get_shipping_report', including name, description, schema, and handler, added to the reportingTools array.
    { name: "get_shipping_report", description: "Get shipping report from ShipBob", schema: { startDate: z.string().describe("Start date for the report (YYYY-MM-DD)"), endDate: z.string().describe("End date for the report (YYYY-MM-DD)"), fulfillmentCenterId: z.string().optional().describe("Filter by fulfillment center ID") }, handler: async ({ startDate, endDate, fulfillmentCenterId }) => { try { const params = { startDate, endDate, fulfillmentCenterId }; const report = await shipbobClient.getShippingReport(params); return { content: [{ type: "text", text: JSON.stringify(report, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving shipping report: ${error.message}` }], isError: true }; } } }
  • Helper method in ShipBobClient that makes the API request to '/reports/shipping' endpoint, called by the tool handler.
    async getShippingReport(params) { return this.request('GET', '/reports/shipping', null, params); }
  • src/server.js:58-58 (registration)
    Registration call that adds all reporting tools, including 'get_shipping_report', to the MCP server via the generic registerTools function.
    registerTools(reportingTools);

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