Skip to main content
Glama
dev-in-black

OpenProject MCP Server

by dev-in-black

remove_watcher

Remove a user from watching a specific work package in OpenProject to reduce notifications and manage watcher lists.

Instructions

Remove a user from work package watchers.

Args:
    work_package_id: Work package ID
    user_id: User ID to remove from watchers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
work_package_idYes
user_idYes

Implementation Reference

  • The MCP tool handler and registration for 'remove_watcher'. This function is decorated with @mcp.tool(), defining the tool interface and delegating to the core logic in work_packages.remove_watcher.
    @mcp.tool()
    async def remove_watcher(work_package_id: int, user_id: int):
        """Remove a user from work package watchers.
    
        Args:
            work_package_id: Work package ID
            user_id: User ID to remove from watchers
        """
        return await work_packages.remove_watcher(
            work_package_id=work_package_id, user_id=user_id
        )
  • Core helper function implementing the removal of a watcher by sending a DELETE request to the OpenProject API endpoint for work package watchers.
    async def remove_watcher(work_package_id: int, user_id: int) -> dict[str, Any]:
        """Remove a user from work package watchers.
    
        Args:
            work_package_id: Work package ID
            user_id: User ID to remove from watchers
    
        Returns:
            Success confirmation
        """
        client = OpenProjectClient()
    
        try:
            result = await client.delete(
                f"work_packages/{work_package_id}/watchers/{user_id}"
            )
            return result
        finally:
            await client.close()

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/dev-in-black/openproject-mcp'

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