Skip to main content
Glama

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, ), }, ], }; }

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

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