Skip to main content
Glama

get_shipping_report

Generate detailed shipping reports from the ShipBob API by specifying date ranges and fulfillment center IDs for targeted logistics analysis.

Input Schema

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

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "endDate": { "description": "End date for the report (YYYY-MM-DD)", "type": "string" }, "fulfillmentCenterId": { "description": "Filter by fulfillment center ID", "type": "string" }, "startDate": { "description": "Start date for the report (YYYY-MM-DD)", "type": "string" } }, "required": [ "startDate", "endDate" ], "type": "object" }

Implementation Reference

  • The main handler function for the 'get_shipping_report' MCP tool. It constructs parameters from input, calls the ShipBob API via shipbobClient, formats the report as JSON text response, 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 }; } }
  • Zod schema defining the input parameters for the get_shipping_report tool: required startDate and endDate (YYYY-MM-DD format), 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 tool definition object (registration in the reportingTools array), which includes name, description, schema, and handler. This array is later registered in the MCP server.
    { 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 }; } } }
  • src/server.js:58-58 (registration)
    Call to registerTools(reportingTools) in the MCP server setup, which iterates over the tools array and registers each tool using server.tool(name, schema, handler).
    registerTools(reportingTools);
  • Helper method in ShipBobClient class that performs the actual API request to ShipBob's /reports/shipping endpoint, used by the tool handler.
    async getShippingReport(params) { return this.request('GET', '/reports/shipping', null, params); }

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