Skip to main content
Glama

transition_issue

Change Jira issue status by executing workflow transitions with optional comments to track progress updates.

Instructions

Change the status of a Jira issue by transitioning it

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueKeyYesThe issue key to transition (e.g., PROJ-123)
transitionIdYesThe transition ID to execute (get from get_transitions)
commentNoOptional comment to add with the transition

Implementation Reference

  • The core handler function that executes the tool logic: destructures arguments, validates inputs, constructs transition payload (with optional comment), calls Jira API to perform the transition, and returns success/error response.
    async handleTransitionIssue(args: any) {
      try {
        const { issueKey, transitionId, comment } = args;
    
        if (!issueKey || !transitionId) {
          throw new Error('issueKey and transitionId are required');
        }
    
        const transitionData: any = {
          transition: {
            id: transitionId,
          },
        };
    
        // Add comment if provided
        if (comment) {
          transitionData.update = {
            comment: [
              {
                add: {
                  body: comment,
                },
              },
            ],
          };
        }
    
        await this.apiClient.post(`/issue/${issueKey}/transitions`, transitionData);
    
        return {
          content: [
            {
              type: 'text',
              text: `✅ Issue ${issueKey} transitioned successfully!`,
            },
          ],
        };
      } catch (error: any) {
        return {
          content: [
            {
              type: 'text',
              text: JiraFormatters.formatError(error),
            },
          ],
          isError: true,
        };
      }
    }
  • Tool definition including name, description, and input schema (JSON Schema) for validating tool arguments.
    {
      name: 'transition_issue',
      description: 'Change the status of a Jira issue by transitioning it',
      inputSchema: {
        type: 'object',
        properties: {
          issueKey: {
            type: 'string',
            description: 'The issue key to transition (e.g., PROJ-123)',
          },
          transitionId: {
            type: 'string',
            description: 'The transition ID to execute (get from get_transitions)',
          },
          comment: {
            type: 'string',
            description: 'Optional comment to add with the transition',
          },
        },
        required: ['issueKey', 'transitionId'],
      },
    },
  • src/index.ts:130-131 (registration)
    Registers the tool handler in the MCP server's switch statement for routing tool calls to the appropriate handler method.
    case 'transition_issue':
      return this.transitionHandlers.handleTransitionIssue(request.params.arguments);

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/pdogra1299/jira-mcp-server'

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