list_inventory_parts
Retrieve and manage parts inventory data from Shopmonkey with pagination support for efficient stock tracking and control.
Instructions
List parts from Shopmonkey inventory. Supports pagination.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| locationId | No | Filter by location ID. Defaults to SHOPMONKEY_LOCATION_ID env var if set. | |
| limit | No | Maximum number of results to return (default: 25) | |
| page | No | Page number for pagination (default: 1) |
Implementation Reference
- src/tools/inventory.ts:59-68 (handler)The handler function for list_inventory_parts, which calls shopmonkeyRequest to fetch parts.
async list_inventory_parts(args) { const params: Record<string, string> = {}; if (args.locationId !== undefined) params.locationId = String(args.locationId); if (args.limit !== undefined) params.limit = String(args.limit); if (args.page !== undefined) params.page = String(args.page); applyDefaultLocation(params); const data = await shopmonkeyRequest<InventoryPart[]>('GET', '/inventory/part', undefined, params); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; }, - src/tools/inventory.ts:7-18 (schema)The MCP tool definition for list_inventory_parts, specifying the input schema.
{ name: 'list_inventory_parts', description: 'List parts from Shopmonkey inventory. Supports pagination.', inputSchema: { type: 'object' as const, properties: { locationId: { type: 'string', description: 'Filter by location ID. Defaults to SHOPMONKEY_LOCATION_ID env var if set.' }, limit: { type: 'number', description: 'Maximum number of results to return (default: 25)' }, page: { type: 'number', description: 'Page number for pagination (default: 1)' }, }, }, },