create_tasks
Add multiple tasks to a specific column in a Yokan Board. Define task details including title, description, and due date to organize work efficiently.
Instructions
Creates multiple new tasks in a specified column.
Args: board_id (int): The ID of the board containing the column. column_id (str): The ID of the column to add the tasks to. tasks (List[Dict]): A list of dictionaries, where each dictionary represents a task and contains 'title' and optional 'description' and 'dueDate'. auth (AuthContext): The authentication context containing user ID and token.
Returns: List[str]: A list of IDs for the newly created tasks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| board_id | Yes | ||
| column_id | Yes | ||
| tasks | Yes | ||
| auth | Yes |
Implementation Reference
- src/main.py:415-456 (handler)The 'create_tasks' function serves as the MCP tool handler. It validates the existence of the column and board, generates unique IDs for the new tasks, and appends them to the column's task list.
async def create_tasks( board_id: int, column_id: str, tasks: List[Dict], auth: AuthContext, ) -> List[str]: """Creates multiple new tasks in a specified column. Args: board_id (int): The ID of the board containing the column. column_id (str): The ID of the column to add the tasks to. tasks (List[Dict]): A list of dictionaries, where each dictionary represents a task and contains 'title' and optional 'description' and 'dueDate'. auth (AuthContext): The authentication context containing user ID and token. Returns: List[str]: A list of IDs for the newly created tasks. """ board = await yokan_client.get_board(board_id=board_id, token=auth.token) if "columns" not in board.data or column_id not in board.data["columns"]: raise McpError(error=ErrorData(code=NOT_FOUND, message="Column not found")) column = board.data["columns"][column_id] if "tasks" not in column: column["tasks"] = [] new_task_ids = [] for task_data in tasks: task_id = str(uuid.uuid4()) new_task = { "id": task_id, "content": task_data.get("title"), "description": task_data.get("description"), "dueDate": task_data.get("dueDate"), } column["tasks"].append(new_task) new_task_ids.append(task_id) await yokan_client.update_board( board_id=board_id, name=board.name, data=board.data, token=auth.token ) return new_task_ids