Skip to main content
Glama
talhaorak

Taiga MCP Bridge

by talhaorak

get_issue

Retrieve detailed information about a specific issue by its ID using this tool, enabling AI systems to access and manage Taiga project data efficiently.

Instructions

Gets detailed information about a specific issue by its ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issue_idYes
session_idYes

Implementation Reference

  • The main handler function for the 'get_issue' tool. It authenticates the session, retrieves the Taiga client wrapper, fetches the issue by ID using the client's API, and returns the issue details or raises appropriate errors.
    @mcp.tool("get_issue", description="Gets detailed information about a specific issue by its ID.")
    def get_issue(session_id: str, issue_id: int) -> Dict[str, Any]:
        """Retrieves issue details by ID."""
        logger.info(
            f"Executing get_issue ID {issue_id} for session {session_id[:8]}...")
        taiga_client_wrapper = _get_authenticated_client(session_id) # Use wrapper variable name
        try:
            # Issues expects issue_id as a positional argument
            issue = taiga_client_wrapper.api.issues.get(issue_id)
            # return issue.to_dict() # Remove .to_dict()
            return issue # Return directly
        except TaigaException as e:
            logger.error(
                f"Taiga API error getting issue {issue_id}: {e}", exc_info=False)
            raise e
        except Exception as e:
            logger.error(
                f"Unexpected error getting issue {issue_id}: {e}", exc_info=True)
            raise RuntimeError(f"Server error getting issue: {e}")
  • src/server.py:659-659 (registration)
    The @mcp.tool decorator registers the 'get_issue' tool with FastMCP, specifying its name and description.
    @mcp.tool("get_issue", description="Gets detailed information about a specific issue by its ID.")
  • Helper function used by get_issue to retrieve and validate the authenticated TaigaClientWrapper 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

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