update_checkitem
Modify Trello checklist items by updating their name, completion status, or position within a checklist.
Instructions
Update a checkitem in a checklist.
Args:
checklist_id (str): The ID of the checklist containing the item
checkitem_id (str): The ID of the checkitem to update
name (Optional[str]): New name for the checkitem
checked (Optional[bool]): New checked state
pos (Optional[str]): New position for the item
Returns:
Dict: The updated checkitem data
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| checklist_id | Yes | ||
| checkitem_id | Yes | ||
| name | No | ||
| checked | No | ||
| pos | No |
Implementation Reference
- server/tools/checklist.py:104-126 (handler)The MCP tool handler function for 'update_checkitem' that delegates to the ChecklistService.async def update_checkitem( checklist_id: str, checkitem_id: str, name: str | None = None, checked: bool | None = None, pos: str | None = None, ) -> Dict: """ Update a checkitem in a checklist. Args: checklist_id (str): The ID of the checklist containing the item checkitem_id (str): The ID of the checkitem to update name (Optional[str]): New name for the checkitem checked (Optional[bool]): New checked state pos (Optional[str]): New position for the item Returns: Dict: The updated checkitem data """ return await service.update_checkitem( checklist_id, checkitem_id, name, checked, pos )
- server/tools/tools.py:37-37 (registration)Registration of the 'update_checkitem' tool with the MCP server.mcp.add_tool(checklist.update_checkitem)
- server/services/checklist.py:119-149 (helper)ChecklistService.update_checkitem method that implements the core logic by calling the Trello API to update the checkitem.async def update_checkitem( self, checklist_id: str, checkitem_id: str, name: str | None = None, checked: bool | None = None, pos: str | None = None, ) -> Dict: """ Update a checkitem in a checklist. Args: checklist_id (str): The ID of the checklist containing the item checkitem_id (str): The ID of the checkitem to update name (Optional[str]): New name for the checkitem checked (Optional[bool]): New checked state pos (Optional[str]): New position for the item Returns: Dict: The updated checkitem data """ data = {} if name: data["name"] = name if checked is not None: data["checked"] = checked if pos: data["pos"] = pos return await self.client.PUT( f"/checklists/{checklist_id}/checkItems/{checkitem_id}", data=data )