Skip to main content
Glama
sakce

Monday.com MCP Server

by sakce

monday-get-item-updates

Retrieve updates for a specific item in Monday.com by providing the item ID and optional limit, enabling efficient tracking of item activity.

Instructions

Get updates for a specific item in Monday.com

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemIdYesID of the Monday.com item to get updates for.
limitNoMaximum number of updates to retrieve. Default is 25.

Implementation Reference

  • The FastMCP tool handler decorated with @mcp.tool() for the 'monday_get_item_updates' tool. It retrieves the Monday client, calls the core helper function, and returns the formatted text result or error.
    async def monday_get_item_updates(itemId: str, limit: int = 25) -> str:
        """Get updates for a specific item in Monday.com.
    
        Args:
            itemId: ID of the Monday.com item to get updates for.
            limit: Maximum number of updates to retrieve. Default is 25.
        """
        try:
            client = get_monday_client()
            result = await handle_monday_get_item_updates(itemId, limit, client)
            return result[0].text
        except Exception as e:
            return f"Error getting item updates: {e}"
  • The core implementation function 'handle_monday_get_item_updates' that executes a GraphQL query to fetch the latest updates for a Monday.com item, formats the response with details like creator, body, and assets, and returns TextContent.
    async def handle_monday_get_item_updates(
        itemId: str,
        monday_client: MondayClient,
        limit: int = 25,
    ) -> list[types.TextContent]:
        """Get updates for a specific item in Monday.com"""
    
        query = f"""
        query {{
            items (ids: {itemId}) {{
                updates (limit: {limit}) {{
                    id
                    body
                    created_at
                    creator {{
                        id
                        name
                    }}
                    assets {{
                        id
                        name
                        url
                    }}
                }}
            }}
        }}
        """
    
        # Setting no_log flag to true if it exists to prevent activity tracking
        # Note: This is a preventative measure as the _query method might accept this parameter
        try:
            response = monday_client.custom._query(query, no_log=True)
        except TypeError:
            # If no_log param doesn't exist, try with default params
            response = monday_client.custom._query(query)
    
        if (
            not response
            or "data" not in response
            or not response["data"]["items"]
            or not response["data"]["items"][0]["updates"]
        ):
            return [
                types.TextContent(type="text", text=f"No updates found for item {itemId}.")
            ]
    
        updates = response["data"]["items"][0]["updates"]
    
        formatted_updates = []
        for update in updates:
            update_text = f"Update ID: {update['id']}\n"
            update_text += f"Created: {update['created_at']}\n"
            update_text += (
                f"Creator: {update['creator']['name']} (ID: {update['creator']['id']})\n"
            )
            update_text += f"Body: {update['body']}\n"
    
            # Add information about attached files if present
            if update.get("assets"):
                update_text += "\nAttached Files:\n"
                for asset in update["assets"]:
                    update_text += f"- {asset['name']}: {asset['url']}\n"
    
            update_text += "\n\n"
            formatted_updates.append(update_text)
    
        return [
            types.TextContent(
                type="text",
                text=f"Updates for item {itemId}:\n\n{''.join(formatted_updates)}",
            )
        ]
  • Imports from mcp_server_monday.item including the handle_monday_get_item_updates function used by the tool handler.
    from mcp_server_monday.board import (
        handle_monday_create_board,
        handle_monday_create_new_board_group,
        handle_monday_get_board_columns,
        handle_monday_get_board_groups,
        handle_monday_list_boards,
    )
    from mcp_server_monday.constants import MONDAY_API_KEY
    from mcp_server_monday.item import (
        handle_monday_archive_item,
        handle_monday_create_item,
        handle_monday_create_update_on_item,
        handle_monday_delete_item,
        handle_monday_get_item_by_id,
        handle_monday_get_item_updates,
        handle_monday_list_items_in_groups,
        handle_monday_list_subitems_in_items,
        handle_monday_move_item_to_group,
        handle_monday_update_item,
    )

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