Skip to main content
Glama
yokan-board
by yokan-board

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
NameRequiredDescriptionDefault
board_idYes
task_idYes
authYes

Implementation Reference

  • 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
        )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yokan-board/yokan-board-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server