monday-get-board-columns
Retrieve column details for a specific Monday.com board by providing the board ID. Use this tool to fetch structured column information for efficient board management.
Instructions
Get the Columns of a Monday.com Board.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| boardId | Yes | Monday.com Board ID that the Item or Sub-item is on. |
Implementation Reference
- src/mcp_server_monday/board.py:21-55 (handler)The core handler function that implements the logic for retrieving board columns from Monday.com using GraphQL query, processes column settings, and returns formatted text content.async def handle_monday_get_board_columns( boardId: str, monday_client: MondayClient ) -> list[types.TextContent]: """Get the Columns of a Monday.com Board.""" query = f""" query {{ boards(ids: {boardId}) {{ columns {{ id title type settings_str }} }} }} """ response = monday_client.custom._query(query) for board in response.get("data", {}).get("boards", []): for column in board["columns"]: settings_str = column.pop("settings_str", None) if settings_str: if isinstance(settings_str, str): try: settings_obj = json.loads(settings_str) if settings_obj.get("labels"): column["available_labels"] = settings_obj["labels"] except json.JSONDecodeError: pass return [ types.TextContent( type="text", text=f"Got the columns of a Monday.com board:\n{json.dumps(response)}", ) ]
- src/mcp_server_monday/fastmcp_server.py:77-89 (registration)Tool registration using FastMCP's @mcp.tool() decorator. This wrapper function initializes the Monday client, calls the core handler, and handles errors, exposing the tool as 'monday-get-board-columns'.@mcp.tool() async def monday_get_board_columns(boardId: str) -> str: """Get the Columns of a Monday.com Board. Args: boardId: Monday.com Board ID that the Item or Sub-item is on. """ try: client = get_monday_client() result = await handle_monday_get_board_columns(boardId, client) return result[0].text except Exception as e: return f"Error getting board columns: {e}"