list_categories
Retrieve available item categories from the ConsignCloud inventory system to organize products and manage stock efficiently.
Instructions
List item categories
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of results (default: 1000) | |
| cursor | No |
Implementation Reference
- src/client.ts:264-267 (handler)Core handler function in ConsignCloudClient that executes the API call to list item categories.async listCategories(params?: Record<string, any>): Promise<PaginatedResponse<ItemCategory>> { const response = await this.client.get('/item-categories', { params }); return response.data; }
- src/server.ts:476-478 (handler)MCP tool call handler that processes the tool execution request and delegates to the client.case 'list_categories': const categoriesParams = { limit: 1000, ...(args as any) }; return { content: [{ type: 'text', text: JSON.stringify(await client.listCategories(categoriesParams), null, 2) }] };
- src/server.ts:205-215 (registration)Tool registration definition including name, description, and input schema, returned by createTools().{ name: 'list_categories', description: 'List item categories', inputSchema: { type: 'object', properties: { limit: { type: 'number', description: 'Number of results (default: 1000)' }, cursor: { type: 'string' }, }, }, },
- src/types.ts:77-80 (schema)Type definition for the paginated response returned by listCategories.export interface PaginatedResponse<T> { data: T[]; next_cursor: string | null; }
- src/types.ts:60-65 (schema)Type definition for ItemCategory used in the response.export interface ItemCategory { id: string; name: string; created: string; deleted: string | null; }