list_items
Retrieve inventory items from ConsignCloud with filters for price, category, account, status, or location to manage consignment operations.
Instructions
List inventory items with optional filters. Supports filtering by price, category, account, status, location, and more.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of results to return (default: 1000) pagination is we need more | |
| cursor | No | Pagination cursor | |
| status | No | Filter by status | |
| category | No | Filter by category ID | |
| account | No | Filter by account ID | |
| location | No | Filter by location ID | |
| tag_price_gte | No | Filter items with price >= this value (in cents) | |
| tag_price_lte | No | Filter items with price <= this value (in cents) |
Implementation Reference
- src/server.ts:11-27 (schema)Input schema definition and metadata for the 'list_items' MCP tool.{ name: 'list_items', description: 'List inventory items with optional filters. Supports filtering by price, category, account, status, location, and more.', inputSchema: { type: 'object', properties: { limit: { type: 'number', description: 'Number of results to return (default: 1000) pagination is we need more' }, cursor: { type: 'string', description: 'Pagination cursor' }, status: { type: 'string', description: 'Filter by status' }, category: { type: 'string', description: 'Filter by category ID' }, account: { type: 'string', description: 'Filter by account ID' }, location: { type: 'string', description: 'Filter by location ID' }, tag_price_gte: { type: 'number', description: 'Filter items with price >= this value (in cents)' }, tag_price_lte: { type: 'number', description: 'Filter items with price <= this value (in cents)' }, }, }, },
- src/server.ts:415-420 (registration)Registers the tools list (including list_items) with the MCP server via ListToolsRequest handler.const tools = createTools(); // Handle list tools request server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools, }));
- src/server.ts:428-430 (handler)MCP CallTool handler case for 'list_items': delegates to client.listItems and formats response as text/JSON.case 'list_items': const itemsParams = { limit: 1000, ...(args as any) }; return { content: [{ type: 'text', text: JSON.stringify(await client.listItems(itemsParams), null, 2) }] };
- src/client.ts:87-93 (handler)Core implementation: HTTP GET request to /items endpoint with query params, processes paginated response using convertItemResponse.async listItems(params?: Record<string, any>): Promise<PaginatedResponse<Item>> { const response = await this.client.get('/items', { params }); return { data: response.data.data.map((item: any) => this.convertItemResponse(item)), next_cursor: response.data.next_cursor, }; }