Skip to main content
Glama
sakce

Monday.com MCP Server

by sakce

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
NameRequiredDescriptionDefault
boardIdYesMonday.com Board ID that the Item or Sub-item is on.

Implementation Reference

  • 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)}",
            )
        ]
  • 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}"

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/sakce/mcp-server-monday'

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