create_category
Create new product categories to organize inventory in consignment and retail operations. This tool helps manage item classification for better inventory tracking and sales management.
Instructions
Create a new item category
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Category name |
Implementation Reference
- src/server.ts:480-481 (handler)MCP tool handler for 'create_category' that calls client.createCategory with arguments and returns JSON-stringified result.
case 'create_category': return { content: [{ type: 'text', text: JSON.stringify(await client.createCategory(args as any), null, 2) }] }; - src/server.ts:216-226 (registration)Registration of the 'create_category' tool in the tools list for MCP ListToolsRequest, including description and input schema.
{ name: 'create_category', description: 'Create a new item category', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Category name' }, }, required: ['name'], }, }, - src/server.ts:219-224 (schema)Input schema definition for the create_category tool, specifying required 'name' field.
inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Category name' }, }, required: ['name'], - src/client.ts:274-277 (helper)Implementation of createCategory method in ConsignCloudClient that performs the actual POST request to the API endpoint '/item-categories'.
async createCategory(data: Partial<ItemCategory>): Promise<ItemCategory> { const response = await this.client.post('/item-categories', data); return response.data; }