Skip to main content
Glama

get_jira_transitions

Retrieve available workflow transitions for a Jira issue by specifying its issue key, enabling users to view and manage next steps in the issue's lifecycle with ease.

Instructions

Get available workflow transitions for a Jira issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issue_keyYesThe issue key (e.g., PROJECT-123)

Implementation Reference

  • The primary handler function implementing the get_jira_transitions tool logic. It uses the JiraV3APIClient to fetch transitions and converts them to JiraTransitionResult models.
    async def get_jira_transitions(self, issue_key: str) -> List[JiraTransitionResult]:
        """Get available transitions for an issue using v3 REST API"""
        logger.info("Starting get_jira_transitions...")
    
        try:
            # Use v3 API client
            v3_client = self._get_v3_api_client()
            response_data = await v3_client.get_transitions(issue_id_or_key=issue_key)
    
            # Extract transitions from response
            transitions = response_data.get("transitions", [])
    
            # Convert to JiraTransitionResult objects maintaining compatibility
            results = [
                JiraTransitionResult(id=transition["id"], name=transition["name"])
                for transition in transitions
            ]
    
            logger.info(f"Found {len(results)} transitions for issue {issue_key}")
            return results
    
        except Exception as e:
            error_msg = f"Failed to get transitions for {issue_key}: {type(e).__name__}: {str(e)}"
            logger.error(error_msg, exc_info=True)
            print(error_msg)
            raise ValueError(error_msg)
  • Registration of the tool handler in the MCP server's call_tool method. This match statement dispatches calls to 'get_jira_transitions' to the JiraServer.get_jira_transitions method.
    case JiraTools.GET_TRANSITIONS.value:
        logger.info("About to AWAIT jira_server.get_jira_transitions...")
        issue_key = arguments.get("issue_key")
        if not issue_key:
            raise ValueError("Missing required argument: issue_key")
        result = await jira_server.get_jira_transitions(issue_key)
        logger.info("COMPLETED await jira_server.get_jira_transitions.")
  • The input schema definition for the get_jira_transitions tool, registered in the server's list_tools method.
    Tool(
        name=JiraTools.GET_TRANSITIONS.value,
        description="Get available workflow transitions for a Jira issue",
        inputSchema={
            "type": "object",
            "properties": {
                "issue_key": {
                    "type": "string",
                    "description": "The issue key (e.g., PROJECT-123)",
                }
            },
            "required": ["issue_key"],
        },
  • Supporting helper method in JiraV3APIClient that performs the actual HTTP request to Jira's /rest/api/3/issue/{issue}/transitions endpoint to retrieve available transitions.
    async def get_transitions(
        self,
        issue_id_or_key: str,
        expand: Optional[str] = None,
        transition_id: Optional[str] = None,
        skip_remote_only_condition: Optional[bool] = None,
        include_unavailable_transitions: Optional[bool] = None,
        sort_by_ops_bar_and_status: Optional[bool] = None,
    ) -> Dict[str, Any]:
        """
        Get available transitions for an issue using the v3 REST API.
    
        Returns either all transitions or a transition that can be performed by the user
        on an issue, based on the issue's status.
    
        Args:
            issue_id_or_key: Issue ID or key (required)
            expand: Expand additional transition fields in response
            transition_id: Get only the transition matching this ID
            skip_remote_only_condition: Skip remote-only conditions check
            include_unavailable_transitions: Include transitions that can't be performed
            sort_by_ops_bar_and_status: Sort transitions by operations bar and status
    
        Returns:
            Dictionary containing the transitions response with transition details
    
        Raises:
            ValueError: If the API request fails
        """
        if not issue_id_or_key:
            raise ValueError("issue_id_or_key is required")
    
        params = {
            "expand": expand,
            "transitionId": transition_id,
            "skipRemoteOnlyCondition": skip_remote_only_condition,
            "includeUnavailableTransitions": include_unavailable_transitions,
            "sortByOpsBarAndStatus": sort_by_ops_bar_and_status,
        }
    
        params = {k: v for k, v in params.items() if v is not None}
    
        endpoint = f"/issue/{issue_id_or_key}/transitions"
        logger.debug(
            f"Fetching transitions with v3 API endpoint: {endpoint} with params: {params}"
        )
        response_data = await self._make_v3_api_request("GET", endpoint, params=params)
        logger.debug(f"Transitions API response: {json.dumps(response_data, indent=2)}")
        return response_data
  • Pydantic model used for output validation and serialization of individual transition results (id and name).
    class JiraTransitionResult(BaseModel):
        id: str
        name: str
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves 'available workflow transitions,' implying a read-only operation, but does not specify whether it requires authentication, has rate limits, returns paginated results, or details the output format. For a tool with zero annotation coverage, this is a significant gap in behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, making it easy for an agent to parse quickly. Every part of the sentence earns its place by conveying essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (retrieving workflow transitions) and lack of annotations and output schema, the description is incomplete. It does not explain what the output includes (e.g., transition IDs, names, conditions) or behavioral aspects like error handling. For a tool with no structured output documentation, the description should provide more context to aid the agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'issue_key' parameter clearly documented. The description does not add any semantic details beyond what the schema provides, such as examples of transitions or constraints. With high schema coverage, the baseline score is 3, as the description does not compensate but also does not detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get available workflow transitions for a Jira issue.' It specifies the verb ('Get') and resource ('workflow transitions for a Jira issue'), making the action and target explicit. However, it does not distinguish this tool from its sibling 'transition_jira_issue,' which might handle applying transitions, so it lacks sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., needing an existing issue), exclusions, or compare it to siblings like 'transition_jira_issue' for applying transitions or 'get_jira_issue' for general issue data. This leaves the agent without context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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/InfinitIQ-Tech/mcp-jira'

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