get_tasks
Retrieve tasks from a Yokan Board, with optional filtering by column to organize workflow and track progress.
Instructions
Retrieves all tasks for a given board, optionally filtered by column.
Args: board_id (int): The ID of the board to retrieve tasks from. auth (AuthContext): The authentication context containing user ID and token. column_id (Optional[str], optional): The ID of the column to filter tasks by. If None, retrieves tasks from all columns. Defaults to None.
Returns: List[Dict]: A list of dictionaries, where each dictionary represents a task.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| board_id | Yes | ||
| auth | Yes | ||
| column_id | No |
Implementation Reference
- src/main.py:458-488 (handler)The handler implementation for the 'get_tasks' tool, which fetches tasks from a Yokan board, optionally filtered by column.
@app_instance.tool @error_handler async def get_tasks( board_id: int, auth: AuthContext, column_id: Optional[str] = None, ) -> List[Dict]: """Retrieves all tasks for a given board, optionally filtered by column. Args: board_id (int): The ID of the board to retrieve tasks from. auth (AuthContext): The authentication context containing user ID and token. column_id (Optional[str], optional): The ID of the column to filter tasks by. If None, retrieves tasks from all columns. Defaults to None. Returns: List[Dict]: A list of dictionaries, where each dictionary represents a task. """ board = await yokan_client.get_board(board_id=board_id, token=auth.token) if "columns" not in board.data: return [] if column_id: if column_id not in board.data["columns"]: raise McpError(error=ErrorData(code=NOT_FOUND, message="Column not found")) return board.data["columns"][column_id].get("tasks", []) all_tasks = [] for col in board.data["columns"].values(): all_tasks.extend(col.get("tasks", [])) return all_tasks