get_inventory_summary
Retrieve inventory summary for a product including quantities on hand, available, and reserved stock levels to monitor current inventory status.
Instructions
Get inventory summary for a product including quantities on hand, available, reserved, etc.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| productId | Yes | The product ID (UUID) |
Implementation Reference
- src/handlers/product-handlers.js:63-72 (handler)Handler function that validates the productId argument and delegates to InflowClient.getProductSummary to fetch the inventory summary.async getProductSummary(client, args) { if (!args.productId) { return { success: false, error: 'productId is required' }; } return await client.getProductSummary(args.productId); },
- index.js:110-115 (schema)Input schema definition using Zod for the get_inventory_summary tool, specifying the required productId parameter.{ description: 'Get inventory summary for a product including quantities on hand, available, reserved, etc.', inputSchema: { productId: z.string().describe('The product ID (UUID)') } },
- index.js:108-127 (registration)MCP server registration of the get_inventory_summary tool, including schema and wrapper that calls the productHandlers handler and formats the response.server.registerTool( 'get_inventory_summary', { description: 'Get inventory summary for a product including quantities on hand, available, reserved, etc.', inputSchema: { productId: z.string().describe('The product ID (UUID)') } }, async (args) => { const result = await productHandlers.getProductSummary(inflowClient, args); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; } );
- src/inflow-client.js:103-116 (helper)InflowClient helper method that makes the HTTP GET request to the Inflow API endpoint for product inventory summary (/products/{productId}/summary).async getProductSummary(productId) { try { const response = await this.client.get( `/${this.config.companyId}/products/${productId}/summary` ); return { success: true, data: response.data }; } catch (error) { return this._handleError(error, 'getProductSummary'); } }