Skip to main content
Glama

get_inventory_report

Retrieve detailed inventory reports from ShipBob API by specifying start and end dates, and optionally filter data by fulfillment center ID for efficient inventory management.

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_inventory_report' tool, which calls the ShipBob API via shipbobClient, formats the report as JSON text content, or returns an 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 }; } }
  • Zod schema defining the input parameters: startDate, endDate, and optional fulfillmentCenterId for the get_inventory_report tool.
    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 registration object for 'get_inventory_report' exported within the reportingTools array.
    { name: "get_inventory_report", description: "Get inventory 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.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 }; } } },
  • ShipBobClient helper method that performs the actual API GET request to '/reports/inventory' endpoint.
    async getInventoryReport(params) { return this.request('GET', '/reports/inventory', null, params); }
  • src/tools/index.js:9-9 (registration)
    Re-export of reportingTools from src/tools/index.js, allowing central import of all tools including get_inventory_report.
    export { reportingTools } from './reporting-tools.js';

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