Skip to main content
Glama
raalarcon9705

raalarcon-jira-mcp-server

transition_issue

Move a Jira issue to a new status by specifying the issue key and transition ID. Optionally add a comment or update fields during the transition.

Instructions

Move a Jira issue to a different status/state

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueKeyYesThe issue key to transition
transitionIdYesThe ID of the transition to perform (will be converted to string automatically)
commentNoOptional comment to add during transition
fieldsNoAdditional fields to update during transition

Implementation Reference

  • The handler case within handleTransitionTool that validates args against transitionIssueSchema and calls jiraClient.transitionIssue(). Returns a success message.
    case 'transition_issue': {
      const validatedArgs = await transitionIssueSchema.validate(args);
      const _result = await jiraClient.transitionIssue(validatedArgs);
      return {
        content: [
          {
            type: 'text',
            text: `Issue ${validatedArgs.issueKey} transitioned successfully`,
          },
        ],
      };
  • The Yup validation schema for transition_issue, requiring issueKey and transitionId (converted to string), with optional comment and fields.
    export const transitionIssueSchema = yup.object({
      issueKey: yup.string().required('Issue key is required'),
      transitionId: yup.mixed()
        .required('Transition ID is required')
        .transform(function (value) {
          // Convert to string if it's a number
          return String(value);
        }),
      comment: yup.string().optional(),
      fields: yup.object().optional(),
    });
  • The JiraClient.transitionIssue() method that calls the Jira API doTransition, handling comment as ADF and optional additional fields.
    async transitionIssue(input: TransitionIssueInput) {
      try {
        const transitionData: IssueUpdateDetails = {
          transition: { id: String(input.transitionId) },
        };
    
        if (input.comment) {
          // Use official ADF format for transition comments
          const adfBody = {
            version: 1,
            type: 'doc',
            content: [
              {
                type: 'paragraph',
                content: [
                  {
                    type: 'text',
                    text: input.comment
                  }
                ]
              }
            ]
          };
    
          transitionData.update = {
            comment: [{
              add: {
                body: adfBody,
              },
            }],
          };
        }
    
        if (input.fields) {
          transitionData.fields = input.fields;
        }
    
        console.error('Transitioning issue with jira.js:', JSON.stringify(transitionData, null, 2));
    
        const response = await this.jira.issues.doTransition({
          issueIdOrKey: input.issueKey,
          ...transitionData,
        });
    
        return response;
      } catch (error: unknown) {
        const errorDetails = {
          message: (error as Error).message,
          status: (error as JiraError).status,
          statusText: (error as JiraError).statusText,
          response: (error as JiraError).response?.data,
          request: {
            issueKey: input.issueKey,
            transitionId: input.transitionId,
            comment: input.comment,
            fields: input.fields
          }
        };
        console.error('Transition error details:', JSON.stringify(errorDetails, null, 2));
        throw new Error(`Failed to transition issue: ${JSON.stringify(errorDetails, null, 2)}`);
      }
    }
  • Tool definition registration inside createTransitionTools, declaring name 'transition_issue', description, inputSchema with properties and required fields.
      {
        name: 'transition_issue',
        description: 'Move a Jira issue to a different status/state',
        inputSchema: {
          type: 'object',
          properties: {
            issueKey: {
              type: 'string',
              description: 'The issue key to transition',
            },
            transitionId: {
              type: 'number',
              description: 'The ID of the transition to perform (will be converted to string automatically)',
            },
            comment: {
              type: 'string',
              description: 'Optional comment to add during transition',
            },
            fields: {
              type: 'object',
              description: 'Additional fields to update during transition',
            },
          },
          required: ['issueKey', 'transitionId'],
        },
      },
    ];
  • src/index.ts:85-89 (registration)
    Routing in the MCP server's CallToolRequestSchema handler: routes 'transition_issue' name prefix to handleTransitionTool.
    } else if (
      name.startsWith('get_transitions') ||
      name.startsWith('transition_issue')
    ) {
      return await handleTransitionTool(name, args || {}, this.jiraClient);
Behavior2/5

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

With no annotations, the description carries full burden. It only says 'Move' but does not disclose behavioral traits like whether the operation is destructive, requires specific permissions, or what happens on failure. The description lacks transparency for a mutation tool.

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

Conciseness4/5

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

The description is a single, direct sentence with no fluff. It is concise but could be slightly expanded for clarity. Still, it earns a high score for efficiency.

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 has 4 parameters, 2 required, and nested objects, the description is insufficient. It does not mention the need to call get_transitions first, nor does it explain the fields parameter or expected output. Lacks essential context for correct usage.

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 coverage is 100%, so the baseline is 3. The description adds no extra meaning beyond the schema; it does not explain that transitionId must be obtained from get_transitions or that comment is optional. No value added.

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

Purpose5/5

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

The description clearly states the verb ('Move') and the resource ('Jira issue') with the specific action ('to a different status/state'), distinguishing it from siblings like get_transitions (which lists transitions) and update_issue (which updates fields without necessarily transitioning status).

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

Usage Guidelines3/5

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

The description implies the tool is for changing issue status but provides no explicit guidance on when to use it versus alternatives like get_transitions or update_issue. There is no mention of prerequisites (e.g., calling get_transitions first) or when not to use it.

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

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

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