Skip to main content
Glama
cosmix

JIRA MCP Server

by cosmix

transition_issue

Change JIRA issue status by performing transitions with optional comments to track workflow progress.

Instructions

Change the status of a JIRA issue by performing a transition

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueKeyYesThe key of the issue to transition
transitionIdYesThe ID of the transition to perform
commentNoOptional comment to add with the transition

Implementation Reference

  • The core handler function that executes the Jira API transition request, including optional comment in ADF format.
    async transitionIssue(
      issueKey: string,
      transitionId: string,
      comment?: string
    ): Promise<void> {
      const payload: any = {
        transition: { id: transitionId },
      };
    
      if (comment) {
        payload.update = {
          comment: [
            {
              add: {
                body: {
                  type: "doc",
                  version: 1,
                  content: [
                    {
                      type: "paragraph",
                      content: [
                        {
                          type: "text",
                          text: comment,
                        },
                      ],
                    },
                  ],
                },
              },
            },
          ],
        };
      }
    
      await this.fetchJson(`/rest/api/3/issue/${issueKey}/transitions`, {
        method: "POST",
        body: JSON.stringify(payload),
      });
    }
  • Input schema definition for the transition_issue tool, specifying parameters and validation.
    inputSchema: {
      type: "object",
      properties: {
        issueKey: {
          type: "string",
          description: "The key of the issue to transition",
        },
        transitionId: {
          type: "string",
          description: "The ID of the transition to perform",
        },
        comment: {
          type: "string",
          description: "Optional comment to add with the transition",
        },
      },
      required: ["issueKey", "transitionId"],
      additionalProperties: false,
    },
  • src/index.ts:200-222 (registration)
    Tool registration in the listTools response, including name, description, and schema.
      name: "transition_issue",
      description:
        "Change the status of a JIRA issue by performing a transition",
      inputSchema: {
        type: "object",
        properties: {
          issueKey: {
            type: "string",
            description: "The key of the issue to transition",
          },
          transitionId: {
            type: "string",
            description: "The ID of the transition to perform",
          },
          comment: {
            type: "string",
            description: "Optional comment to add with the transition",
          },
        },
        required: ["issueKey", "transitionId"],
        additionalProperties: false,
      },
    },
  • MCP tool dispatch handler that validates parameters and delegates to JiraApiService.transitionIssue.
    case "transition_issue": {
      if (
        !args.issueKey ||
        typeof args.issueKey !== "string" ||
        !args.transitionId ||
        typeof args.transitionId !== "string"
      ) {
        throw new McpError(
          ErrorCode.InvalidParams,
          "issueKey and transitionId are required",
        );
      }
      await this.jiraApi.transitionIssue(
        args.issueKey,
        args.transitionId,
        args.comment as string | undefined,
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              {
                message: `Issue ${args.issueKey} transitioned successfully${args.comment ? " with comment" : ""}`,
              },
              null,
              2,
            ),
          },
        ],
      };
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.0

TDQS

C2.5/5.0
Behavior2/5

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

No annotations provided; the description only says 'change the status' with no details on side effects, permissions, or required knowledge of transition IDs. This is insufficient for safe invocation.

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

Conciseness3/5

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

Single sentence, no redundancy, but too brief to be informative. Sacrifices clarity for brevity.

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?

No output schema, no annotations, and no explanation of how to obtain transition IDs or what happens after transition. Incomplete for effective agent use.

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% with descriptions; the tool description adds no extra meaning beyond what the schema already provides. Baseline score applies.

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

Purpose3/5

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

The description states the verb 'change' and resource 'status of a JIRA issue', but uses the jargon 'transition' which may not be clear to all users. It distinguishes from general 'update_issue' but could be more specific.

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?

No guidance on when to use this tool versus siblings like 'get_transitions' or 'update_issue'. The agent must infer context from the tool name alone.

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