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
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"board_id": "<board_id>",
"task_id": "<task_id>",
"auth": "<auth>"
},
"name": "delete_task"
}
}Input 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 )