update_epic
Modify existing epic details in Taiga project management platform via MCP server, enabling AI systems to update project workflows efficiently.
Instructions
Updates details of an existing epic.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| epic_id | Yes | ||
| kwargs | Yes | ||
| session_id | Yes |
Implementation Reference
- src/server.py:923-956 (handler)The handler function for the 'update_epic' MCP tool. It authenticates the session, fetches the current epic to get its version, performs a partial update using the Taiga API's edit method, and handles errors appropriately.@mcp.tool("update_epic", description="Updates details of an existing epic.") def update_epic(session_id: str, epic_id: int, **kwargs) -> Dict[str, Any]: """Updates an epic. Pass fields to update as keyword arguments (e.g., subject, description, status_id, assigned_to, color).""" logger.info( f"Executing update_epic ID {epic_id} for session {session_id[:8]} with data: {kwargs}") taiga_client_wrapper = _get_authenticated_client(session_id) # Use wrapper variable name try: # Use pytaigaclient edit pattern for partial updates if not kwargs: logger.info(f"No fields provided for update on epic {epic_id}") return taiga_client_wrapper.api.epics.get(epic_id) # Get current epic data to retrieve version current_epic = taiga_client_wrapper.api.epics.get(epic_id) version = current_epic.get('version') if not version: raise ValueError(f"Could not determine version for epic {epic_id}") # Use edit method for partial updates with keyword arguments updated_epic = taiga_client_wrapper.api.epics.edit( epic_id=epic_id, version=version, **kwargs ) logger.info(f"Epic {epic_id} update request sent.") return updated_epic except TaigaException as e: logger.error( f"Taiga API error updating epic {epic_id}: {e}", exc_info=False) raise e except Exception as e: logger.error( f"Unexpected error updating epic {epic_id}: {e}", exc_info=True) raise RuntimeError(f"Server error updating epic: {e}")