Skip to main content
Glama

get_user_story_statuses

Retrieve available statuses for user stories in a Taiga project by providing a session ID and project ID. Enables project management automation by querying status options directly from the Taiga MCP Bridge.

Instructions

Lists the available statuses for user stories within a specific project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
session_idYes

Implementation Reference

  • Handler function implementing the get_user_story_statuses tool. Registers the tool with MCP and executes the logic to fetch user story statuses from Taiga API for a given project using an authenticated client session.
    @mcp.tool("get_user_story_statuses", description="Lists the available statuses for user stories within a specific project.") def get_user_story_statuses(session_id: str, project_id: int) -> List[Dict[str, Any]]: """Retrieves the list of user story statuses for a project.""" logger.info( f"Executing get_user_story_statuses for project {project_id}, session {session_id[:8]}...") taiga_client_wrapper = _get_authenticated_client(session_id) # Use wrapper variable name try: # Use pytaigaclient syntax: client.resource.list(project_id=...) # Update resource name: user_story_statuses -> userstory_statuses statuses = taiga_client_wrapper.api.userstory_statuses.list(project_id=project_id) # return [s.to_dict() for s in statuses] # Remove .to_dict() return statuses # Return directly except TaigaException as e: logger.error( f"Taiga API error getting user story statuses for project {project_id}: {e}", exc_info=False) raise e except Exception as e: logger.error( f"Unexpected error getting user story statuses for project {project_id}: {e}", exc_info=True) raise RuntimeError(f"Server error getting user story statuses: {e}")
  • Helper function to retrieve and validate the authenticated TaigaClientWrapper instance from the session store, used by get_user_story_statuses and other tools.
    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:424-424 (registration)
    MCP tool registration decorator for get_user_story_statuses.
    @mcp.tool("get_user_story_statuses", description="Lists the available statuses for user stories within a specific project.")

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