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

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

TableJSON Schema
NameRequiredDescriptionDefault
board_idYes
column_idYes
tasksYes
authYes

Implementation Reference

  • 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

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