Skip to main content
Glama

update_task

Modify existing task details in Taiga project management through the Taiga MCP Bridge, enabling AI systems to efficiently update task information.

Instructions

Updates details of an existing task.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kwargsYes
session_idYes
task_idYes

Implementation Reference

  • The handler function for the 'update_task' MCP tool. It authenticates the session, fetches the current task version, and calls the Taiga API's tasks.edit() to perform partial updates on the task using the provided kwargs.
    @mcp.tool("update_task", description="Updates details of an existing task.") def update_task(session_id: str, task_id: int, **kwargs) -> Dict[str, Any]: """Updates a task. Pass fields to update as keyword arguments (e.g., subject, description, status_id, assigned_to).""" logger.info( f"Executing update_task ID {task_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 task {task_id}") return taiga_client_wrapper.api.tasks.get(task_id) # Get current task data to retrieve version current_task = taiga_client_wrapper.api.tasks.get(task_id) version = current_task.get('version') if not version: raise ValueError(f"Could not determine version for task {task_id}") # Use edit method for partial updates with keyword arguments updated_task = taiga_client_wrapper.api.tasks.edit( task_id=task_id, version=version, **kwargs ) logger.info(f"Task {task_id} update request sent.") return updated_task except TaigaException as e: logger.error( f"Taiga API error updating task {task_id}: {e}", exc_info=False) raise e except Exception as e: logger.error( f"Unexpected error updating task {task_id}: {e}", exc_info=True) raise RuntimeError(f"Server error updating task: {e}")
  • Helper function used by update_task (and other tools) to retrieve and validate the authenticated TaigaClientWrapper instance for the given session_id from the active_sessions dictionary.
    def _get_authenticated_client(session_id: str) -> TaigaClientWrapper: """ Retrieves the authenticated TaigaClientWrapper for a given session ID. Raises PermissionError if the session is invalid or not found. """ client = active_sessions.get(session_id) # Also check if the client object itself exists and is authenticated if not client or not client.is_authenticated: logger.warning(f"Invalid or expired session ID provided: {session_id}") # Raise PermissionError - FastMCP will map this to an appropriate error response raise PermissionError( f"Invalid or expired session ID: '{session_id}'. Please login again.") logger.debug(f"Retrieved valid client for session ID: {session_id}") return client
  • src/server.py:521-521 (registration)
    The @mcp.tool decorator registers the update_task function as an MCP tool named 'update_task' with the specified description.
    @mcp.tool("update_task", description="Updates details of an existing task.")

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/talhaorak/pytaiga-mcp'

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