create_column
Add a new column to a Yokan board to organize tasks and workflows. Specify the board ID and column name to create the column.
Instructions
Creates a new column in a specified board.
Args: board_id (int): The ID of the board to add the column to. name (str): The name of the new column. auth (AuthContext): The authentication context containing user ID and token.
Returns: yokan_models.Column: The newly created column object.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| board_id | Yes | ||
| name | Yes | ||
| auth | Yes |
Implementation Reference
- src/main.py:196-229 (handler)The handler implementation for the 'create_column' tool. It creates a new column object, updates the board's column order, and persists the changes.
async def create_column( board_id: int, name: str, auth: AuthContext, ) -> yokan_models.Column: """Creates a new column in a specified board. Args: board_id (int): The ID of the board to add the column to. name (str): The name of the new column. auth (AuthContext): The authentication context containing user ID and token. Returns: yokan_models.Column: The newly created column object. """ board = await yokan_client.get_board(board_id=board_id, token=auth.token) if "columns" not in board.data: board.data["columns"] = {} if "columnOrder" not in board.data: board.data["columnOrder"] = [] new_column_id = str(uuid.uuid4()) new_column = yokan_models.Column( id=new_column_id, title=name, tasks=[], highlightColor="#AF522B", minimized=False, ) board.data["columns"][new_column_id] = new_column.dict() board.data["columnOrder"].append(new_column_id) await yokan_client.update_board( board_id=board_id, name=board.name, data=board.data, token=auth.token ) return new_column - src/main.py:194-195 (registration)Registration of the 'create_column' tool using the FastMCP decorator.
@app_instance.tool @error_handler