delete_task
Remove a task from a Yokan Kanban board by specifying the board ID and task ID to maintain organized workflows.
Instructions
Deletes a task from a board.
Args: board_id (int): The ID of the board containing the task. task_id (str): The ID of the task to delete. auth (AuthContext): The authentication context containing user ID and token.
Returns: None
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| board_id | Yes | ||
| task_id | Yes | ||
| auth | Yes |
Implementation Reference
- src/main.py:588-622 (handler)The `delete_task` function, decorated with `@app_instance.tool`, implements the logic to remove a task from a board by ID and update the board data via `yokan_client`.
async def delete_task( board_id: int, task_id: str, auth: AuthContext, ) -> None: """Deletes a task from a board. Args: board_id (int): The ID of the board containing the task. task_id (str): The ID of the task to delete. auth (AuthContext): The authentication context containing user ID and token. Returns: None """ board = await yokan_client.get_board(board_id=board_id, token=auth.token) if "columns" not in board.data: raise McpError(error=ErrorData(code=NOT_FOUND, message="Task not found")) task_found = False for column in board.data["columns"].values(): for i, task in enumerate(column.get("tasks", [])): if task.get("id") == task_id: del column["tasks"][i] task_found = True break if task_found: break if not task_found: raise McpError(error=ErrorData(code=NOT_FOUND, message="Task not found")) await yokan_client.update_board( board_id=board_id, name=board.name, data=board.data, token=auth.token )