Skip to main content
Glama

delete_milestone

Remove a milestone by its ID using the Taiga MCP Bridge, enabling precise project management in the Taiga platform.

Instructions

Deletes a milestone by its ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
milestone_idYes
session_idYes

Implementation Reference

  • The primary handler function for the 'delete_milestone' MCP tool. It validates the session, retrieves the authenticated Taiga client, calls the Taiga API to delete the milestone by ID, logs the action, and returns a success status or raises appropriate errors.
    @mcp.tool("delete_milestone", description="Deletes a milestone by its ID.") def delete_milestone(session_id: str, milestone_id: int) -> Dict[str, Any]: """Deletes a milestone by ID.""" logger.warning( f"Executing delete_milestone ID {milestone_id} for session {session_id[:8]}...") taiga_client_wrapper = _get_authenticated_client(session_id) # Use wrapper variable name try: # Use pytaigaclient syntax: client.resource.delete(id=...) taiga_client_wrapper.api.milestones.delete(id=milestone_id) logger.info(f"Milestone {milestone_id} deleted successfully.") return {"status": "deleted", "milestone_id": milestone_id} except TaigaException as e: logger.error( f"Taiga API error deleting milestone {milestone_id}: {e}", exc_info=False) raise e except Exception as e: logger.error( f"Unexpected error deleting milestone {milestone_id}: {e}", exc_info=True) raise RuntimeError(f"Server error deleting milestone: {e}")
  • Helper function used by delete_milestone (and other tools) to retrieve and validate the TaigaClientWrapper instance for the given session_id, raising PermissionError if invalid.
    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
  • The @mcp.tool decorator registers the delete_milestone function as an MCP tool with the specified name and description.
    @mcp.tool("delete_milestone", description="Deletes a milestone by its ID.")

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