list_batches
Retrieve and filter batches of items in ConsignCloud by status or account to manage consignment operations and inventory tracking.
Instructions
List batches of items
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of results (default: 1000) | |
| cursor | No | ||
| status | No | ||
| account | No | Filter by account ID |
Implementation Reference
- src/server.ts:498-500 (handler)MCP server tool handler for 'list_batches' that processes arguments and delegates to client.listBatches()case 'list_batches': const batchesParams = { limit: 1000, ...(args as any) }; return { content: [{ type: 'text', text: JSON.stringify(await client.listBatches(batchesParams), null, 2) }] };
- src/server.ts:290-302 (registration)Tool registration in createTools() array, defining name, description, and input schema{ name: 'list_batches', description: 'List batches of items', inputSchema: { type: 'object', properties: { limit: { type: 'number', description: 'Number of results (default: 1000)' }, cursor: { type: 'string' }, status: { type: 'string', enum: ['draft', 'submitted'] }, account: { type: 'string', description: 'Filter by account ID' }, }, }, },
- src/client.ts:238-241 (helper)ConsignCloudClient helper method implementing the core logic by calling the '/batches' API endpointasync listBatches(params?: Record<string, any>): Promise<PaginatedResponse<Batch>> { const response = await this.client.get('/batches', { params }); return response.data; }