get_inventory_report
Retrieve inventory reports from ShipBob's fulfillment API by specifying date ranges and optional fulfillment center filters to track stock levels and movement.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| startDate | Yes | Start date for the report (YYYY-MM-DD) | |
| endDate | Yes | End date for the report (YYYY-MM-DD) | |
| fulfillmentCenterId | No | Filter by fulfillment center ID |
Implementation Reference
- src/tools/reporting-tools.js:13-29 (handler)The handler function that executes the tool logic: prepares params, calls shipbobClient.getInventoryReport, returns JSON-formatted report or error.
handler: async ({ startDate, endDate, fulfillmentCenterId }) => { try { const params = { startDate, endDate, fulfillmentCenterId }; const report = await shipbobClient.getInventoryReport(params); return { content: [{ type: "text", text: JSON.stringify(report, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving inventory report: ${error.message}` }], isError: true }; } } - src/tools/reporting-tools.js:8-12 (schema)Input schema using Zod for validating parameters: startDate (string), endDate (string), fulfillmentCenterId (optional string).
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") }, - src/server.js:58-58 (registration)Registration of the reportingTools array (containing get_inventory_report) using the registerTools utility.
registerTools(reportingTools); - src/api-client.js:163-165 (helper)Supporting method in ShipBobClient that makes the actual API request to '/reports/inventory'.
async getInventoryReport(params) { return this.request('GET', '/reports/inventory', null, params); } - src/tools/reporting-tools.js:6-7 (registration)Tool metadata: name and description used during registration.
name: "get_inventory_report", description: "Get inventory report from ShipBob",