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
| Name | Required | Description | Default |
|---|---|---|---|
| work_package_id | Yes | ||
| user_id | Yes |
Implementation Reference
- src/openproject_mcp/server.py:150-160 (handler)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()