Skip to main content
Glama

list_epics

Retrieve and filter epics from a Taiga project using session and project IDs to streamline project management and task organization.

Instructions

Lists epics within a specific project, optionally filtered.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filtersYes
project_idYes
session_idYes

Implementation Reference

  • The handler function implementing the 'list_epics' tool. It retrieves an authenticated Taiga client using the session_id, lists epics for the given project_id with optional filters, and returns the list of epics.
    @mcp.tool("list_epics", description="Lists epics within a specific project, optionally filtered.") def list_epics(session_id: str, project_id: int, **filters) -> List[Dict[str, Any]]: """Lists epics for a project. Optional filters like 'status', 'assigned_to' can be passed as keyword arguments.""" logger.info( f"Executing list_epics for project {project_id}, session {session_id[:8]}, filters: {filters}") taiga_client_wrapper = _get_authenticated_client(session_id) # Use wrapper variable name try: # Use pytaigaclient syntax: client.resource.list(project_id=..., **filters) epics = taiga_client_wrapper.api.epics.list(project_id=project_id, **filters) # return [e.to_dict() for e in epics] # Remove .to_dict() return epics # Return directly except TaigaException as e: logger.error( f"Taiga API error listing epics for project {project_id}: {e}", exc_info=False) raise e except Exception as e: logger.error( f"Unexpected error listing epics for project {project_id}: {e}", exc_info=True) raise RuntimeError(f"Server error listing epics: {e}")
  • Helper function used by 'list_epics' and other tools to retrieve the authenticated TaigaClientWrapper instance from the session store.
    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:850-850 (registration)
    The @mcp.tool decorator registers the 'list_epics' function as an MCP tool with the specified name and description.
    @mcp.tool("list_epics", description="Lists epics within a specific project, optionally filtered.")

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