add_checkitem
Add items to Trello checklists to track tasks and progress on cards, specifying completion status and position.
Instructions
Add a new item to a checklist.
Args:
checklist_id (str): The ID of the checklist to add the item to
name (str): The name of the checkitem
checked (bool): Whether the item is checked
pos (Optional[str]): The position of the item
Returns:
Dict: The created checkitem data
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| checklist_id | Yes | ||
| name | Yes | ||
| checked | No | ||
| pos | No |
Implementation Reference
- server/tools/checklist.py:86-101 (handler)MCP tool handler for 'add_checkitem'. Thin wrapper that delegates to ChecklistService.add_checkitem.async def add_checkitem( checklist_id: str, name: str, checked: bool = False, pos: str | None = None ) -> Dict: """ Add a new item to a checklist. Args: checklist_id (str): The ID of the checklist to add the item to name (str): The name of the checkitem checked (bool): Whether the item is checked pos (Optional[str]): The position of the item Returns: Dict: The created checkitem data """ return await service.add_checkitem(checklist_id, name, checked, pos)
- server/tools/tools.py:36-36 (registration)Registration of the 'add_checkitem' tool with the MCP server.mcp.add_tool(checklist.add_checkitem)
- server/services/checklist.py:93-117 (helper)Core implementation in ChecklistService that calls the Trello API to add a checkitem.async def add_checkitem( self, checklist_id: str, name: str, checked: bool = False, pos: str | None = None, ) -> Dict: """ Add a new item to a checklist. Args: checklist_id (str): The ID of the checklist to add the item to name (str): The name of the checkitem checked (bool): Whether the item is checked pos (Optional[str]): The position of the item Returns: Dict: The created checkitem data """ data = {"name": name, "checked": checked} if pos: data["pos"] = pos return await self.client.POST( f"/checklists/{checklist_id}/checkItems", data=data )