update_board
Modify the name of an existing Kanban board in the Yokan Board system to reflect organizational changes or corrections.
Instructions
Updates the name of a Kanban board.
Args: board_id (int): The ID of the board to update. name (str): The new name for the board. auth (AuthContext): The authentication context containing user ID and token.
Returns: int: The ID of the updated board.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| board_id | Yes | ||
| name | Yes | ||
| auth | Yes |
Implementation Reference
- src/main.py:153-173 (handler)The MCP tool handler function for "update_board", which orchestrates the board update process by fetching the existing board and calling the yokan_client.update_board method.
async def update_board( board_id: int, name: str, auth: AuthContext, ) -> int: """Updates the name of a Kanban board. Args: board_id (int): The ID of the board to update. name (str): The new name for the board. auth (AuthContext): The authentication context containing user ID and token. Returns: int: The ID of the updated board. """ # For now, we only support updating the name. # The `data` field will be fetched from the existing board. board = await yokan_client.get_board(board_id=board_id, token=auth.token) return await yokan_client.update_board( board_id=board_id, name=name, data=board.data, token=auth.token ) - src/yokan_client.py:60-69 (handler)The actual low-level client method that sends the PUT request to the Yokan API to update a board.
async def update_board( self, board_id: int, name: str, data: Dict[str, Any], token: str ) -> int: headers = self._get_auth_headers(token) json_data = {"name": name, "data": data} response = await self.client.put( f"{self.base_url}/boards/{board_id}", headers=headers, json=json_data ) response.raise_for_status() return response.json()["changes"]