cozi_add_item
Add new items to your Cozi family organizer lists. Specify the list ID and item description to create shopping lists or todo items that sync across family members.
Instructions
Add a new item to a Cozi list. The item will be added to the specified list.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| listId | Yes | The ID of the list to add the item to | |
| text | Yes | The text/description of the item |
Implementation Reference
- src/tools.ts:164-170 (handler)Handler for the cozi_add_item tool. Calls CoziClient.addItem with list_id and text, returns success message.case 'cozi_add_item': { await client.addItem(args.list_id, args.text); return { success: true, message: `Added "${args.text}" to list`, }; }
- src/tools.ts:41-58 (registration)Registers the cozi_add_item tool in the COZI_TOOLS array, including name, description, and input schema.{ name: 'cozi_add_item', description: 'Add a new item to a Cozi list', inputSchema: { type: 'object', properties: { list_id: { type: 'string', description: 'The ID of the list to add the item to', }, text: { type: 'string', description: 'The text/name of the item to add', }, }, required: ['list_id', 'text'], }, },
- src/tools.ts:44-57 (schema)Defines the input schema for cozi_add_item tool: requires list_id and text strings.inputSchema: { type: 'object', properties: { list_id: { type: 'string', description: 'The ID of the list to add the item to', }, text: { type: 'string', description: 'The text/name of the item to add', }, }, required: ['list_id', 'text'], },
- src/cozi-client.ts:43-49 (helper)Core implementation of adding an item via POST request to Cozi API endpoint.async addItem(listId: string, text: string): Promise<void> { await this.request(`/${this.accountId}/list/${listId}/item/`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ text }), }); }