Skip to main content
Glama

transition_jira_issue

Move a Jira issue to a new status by specifying the issue key and transition ID, optionally adding comments or updating fields during the process.

Instructions

Transition a Jira issue to a new status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commentNoComment to add during transition (optional)
fieldsNoAdditional fields to update during transition (optional)
issue_keyYesThe issue key (e.g., PROJECT-123)
transition_idYesID of the transition to perform (get IDs using get_transitions)

Implementation Reference

  • Main handler function for the 'transition_jira_issue' MCP tool. Validates inputs and delegates to JiraV3APIClient.transition_issue for execution.
    async def transition_jira_issue(
        self,
        issue_key: str,
        transition_id: str,
        comment: Optional[str] = None,
        fields: Optional[Dict[str, Any]] = None,
    ) -> bool:
        """Transition an issue to a new state using v3 REST API"""
        logger.info("Starting transition_jira_issue...")
    
        try:
            # Use v3 API client
            v3_client = self._get_v3_api_client()
            await v3_client.transition_issue(
                issue_id_or_key=issue_key,
                transition_id=transition_id,
                fields=fields,
                comment=comment,
            )
    
            logger.info(
                f"Successfully transitioned issue {issue_key} to transition {transition_id}"
            )
            return True
    
        except Exception as e:
            error_msg = (
                f"Failed to transition {issue_key}: {type(e).__name__}: {str(e)}"
            )
            logger.error(error_msg, exc_info=True)
            print(error_msg)
            raise ValueError(error_msg)
  • Core helper method in JiraV3APIClient that constructs the transition payload and performs the POST request to Jira's /rest/api/3/issue/{key}/transitions endpoint.
    async def transition_issue(
        self,
        issue_id_or_key: str,
        transition_id: str,
        fields: Optional[Dict[str, Any]] = None,
        comment: Optional[str] = None,
        history_metadata: Optional[Dict[str, Any]] = None,
        properties: Optional[list] = None,
    ) -> Dict[str, Any]:
        """
        Transition an issue using the v3 REST API.
    
        Performs an issue transition and, if the transition has a screen,
        updates the fields from the transition screen.
    
        Args:
            issue_id_or_key: Issue ID or key (required)
            transition_id: ID of the transition to perform (required)
            fields: Dict containing field names and values to update during transition
            comment: Simple string comment to add during transition
            history_metadata: Optional history metadata for the transition
            properties: Optional list of properties to set
    
        Returns:
            Empty dictionary on success (204 No Content response)
    
        Raises:
            ValueError: If required parameters are missing or transition fails
        """
        if not issue_id_or_key:
            raise ValueError("issue_id_or_key is required")
    
        if not transition_id:
            raise ValueError("transition_id is required")
    
        # Build the request payload
        payload = {"transition": {"id": transition_id}}
    
        # Add fields if provided
        if fields:
            payload["fields"] = fields
    
        # Add comment if provided - convert simple string to ADF format
        if comment:
            payload["update"] = {
                "comment": [
                    {
                        "add": {
                            "body": {
                                "type": "doc",
                                "version": 1,
                                "content": [
                                    {
                                        "type": "paragraph",
                                        "content": [{"type": "text", "text": comment}],
                                    }
                                ],
                            }
                        }
                    }
                ]
            }
    
        # Add optional metadata
        if history_metadata:
            payload["historyMetadata"] = history_metadata
    
        if properties:
            payload["properties"] = properties
    
        endpoint = f"/issue/{issue_id_or_key}/transitions"
        logger.debug(f"Transitioning issue with v3 API endpoint: {endpoint}")
        logger.debug(f"Transition payload: {json.dumps(payload, indent=2)}")
    
        response_data = await self._make_v3_api_request("POST", endpoint, data=payload)
        logger.debug(f"Transition response: {response_data}")
        return response_data
  • Tool registration in list_tools() including the name 'transition_jira_issue', description, and input schema definition.
        name=JiraTools.TRANSITION_ISSUE.value,
        description="Transition a Jira issue to a new status",
        inputSchema={
            "type": "object",
            "properties": {
                "issue_key": {
                    "type": "string",
                    "description": "The issue key (e.g., PROJECT-123)",
                },
                "transition_id": {
                    "type": "string",
                    "description": "ID of the transition to perform (get IDs using get_transitions)",
                },
                "comment": {
                    "type": "string",
                    "description": "Comment to add during transition (optional)",
                },
                "fields": {
                    "type": "object",
                    "description": "Additional fields to update during transition (optional)",
                },
            },
            "required": ["issue_key", "transition_id"],
        },
    ),
  • Pydantic model used for typing transition results (used by get_jira_transitions).
    class JiraTransitionResult(BaseModel):
        id: str
        name: str
  • Dispatch logic in call_tool() that maps the tool call to the transition_jira_issue handler.
    case JiraTools.TRANSITION_ISSUE.value:
        logger.info("Calling async tool transition_jira_issue...")
        issue_key = arguments.get("issue_key")
        transition_id = arguments.get("transition_id")
        if not issue_key or not transition_id:
            raise ValueError(
                "Missing required arguments: issue_key and transition_id"
            )
        comment = arguments.get("comment")
        fields = arguments.get("fields")
        result = await jira_server.transition_jira_issue(
            issue_key, transition_id, comment, fields
        )
        logger.info("Async tool transition_jira_issue completed.")
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action but lacks critical details: it doesn't specify permissions required, whether the transition is reversible, potential side effects (e.g., updating fields), or error handling. For a mutation tool with zero annotation coverage, this is a significant gap.

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, direct sentence with zero wasted words. It's front-loaded with the core action and resource, making it highly efficient and easy to parse.

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?

For a mutation tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It lacks behavioral context (e.g., effects, permissions), usage guidance relative to siblings, and details on return values or errors, leaving gaps for an AI agent to operate effectively.

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?

Schema description coverage is 100%, so the schema fully documents all parameters. The description adds no parameter-specific information beyond what's in the schema (e.g., it doesn't explain 'fields' object structure or 'transition_id' sourcing). Baseline 3 is appropriate when the schema handles parameter documentation.

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 action ('transition') and resource ('Jira issue') with the target outcome ('to a new status'), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling tools like 'get_jira_transitions' or 'search_jira_issues' beyond the basic verb, missing explicit distinction.

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 doesn't mention prerequisites (e.g., needing to get transition IDs first), exclusions, or how it relates to siblings like 'add_jira_comment' or 'create_jira_issue', leaving usage context unclear.

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