create_checklist
Add a checklist to a Trello card to organize tasks and track progress. Specify the card, checklist name, and optional position.
Instructions
Create a new checklist on a card.
Args:
card_id (str): The ID of the card to create the checklist on
name (str): The name of the checklist
pos (Optional[str]): The position of the checklist (top, bottom, or a positive number)
Returns:
Dict: The created checklist data
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| card_id | Yes | ||
| name | Yes | ||
| pos | No |
Implementation Reference
- server/tools/checklist.py:41-53 (handler)The MCP tool handler function 'create_checklist' that delegates to ChecklistService to create a checklist on a Trello card.async def create_checklist(card_id: str, name: str, pos: str | None = None) -> Dict: """ Create a new checklist on a card. Args: card_id (str): The ID of the card to create the checklist on name (str): The name of the checklist pos (Optional[str]): The position of the checklist (top, bottom, or a positive number) Returns: Dict: The created checklist data """ return await service.create_checklist(card_id, name, pos)
- server/tools/tools.py:33-33 (registration)Registration of the 'create_checklist' tool with the MCP server in the register_tools function.mcp.add_tool(checklist.create_checklist)
- server/services/checklist.py:41-58 (helper)The ChecklistService.create_checklist method that makes the Trello API POST request to create the checklist.async def create_checklist( self, card_id: str, name: str, pos: str | None = None ) -> Dict: """ Create a new checklist on a card. Args: card_id (str): The ID of the card to create the checklist on name (str): The name of the checklist pos (Optional[str]): The position of the checklist (top, bottom, or a positive number) Returns: Dict: The created checklist data """ data = {"name": name} if pos: data["pos"] = pos return await self.client.POST(f"/checklists", data={"idCard": card_id, **data})