Skip to main content
Glama
kornbed

Jira MCP Server for Cursor

by kornbed

update_status

Change the status of a Jira ticket by specifying the ticket ID and transition ID to move it through workflow stages.

Instructions

Update the status of a Jira ticket

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ticketIdYesThe Jira ticket ID
statusYes

Implementation Reference

  • The handler function that performs the Jira status update by calling the doTransition API with the provided ticket ID and transition ID. Includes config validation and error handling.
    async ({ ticketId, status }: { ticketId: string; status: StatusUpdate }) => {
      const configError = validateJiraConfig();
      if (configError) {
        return {
          content: [{ type: "text", text: `Configuration error: ${configError}` }],
        };
      }
    
      try {
        await jira.issues.doTransition({
          issueIdOrKey: ticketId,
          transition: { id: status.transitionId },
        });
    
        return {
          content: [{ type: "text", text: `Updated status of ${ticketId}` }],
        };
      } catch (error) {
        return {
          content: [{ type: "text", text: `Failed to update status: ${(error as Error).message}` }],
        };
      }
    }
  • Zod schema for validating the 'status' input parameter of the update_status tool.
    const StatusUpdateSchema = z.object({
      transitionId: z.string().describe("The ID of the transition to perform"),
    });
  • TypeScript interface defining the shape of the status update input.
    interface StatusUpdate {
      transitionId: string;
    }
  • src/server.ts:345-375 (registration)
    Registration of the 'update_status' tool on the MCP server, specifying name, description, input schema, and handler function.
    server.tool(
      "update_status",
      "Update the status of a Jira ticket",
      {
        ticketId: z.string().describe("The Jira ticket ID"),
        status: StatusUpdateSchema,
      },
      async ({ ticketId, status }: { ticketId: string; status: StatusUpdate }) => {
        const configError = validateJiraConfig();
        if (configError) {
          return {
            content: [{ type: "text", text: `Configuration error: ${configError}` }],
          };
        }
    
        try {
          await jira.issues.doTransition({
            issueIdOrKey: ticketId,
            transition: { id: status.transitionId },
          });
    
          return {
            content: [{ type: "text", text: `Updated status of ${ticketId}` }],
          };
        } catch (error) {
          return {
            content: [{ type: "text", text: `Failed to update status: ${(error as Error).message}` }],
          };
        }
      }
    );
  • Helper function used by the handler to validate Jira configuration environment variables.
    // Helper function to validate Jira configuration
    function validateJiraConfig(): string | null {
      if (!process.env.JIRA_HOST) return "JIRA_HOST environment variable is not set";
      if (!process.env.JIRA_EMAIL) return "JIRA_EMAIL environment variable is not set";
      if (!process.env.JIRA_API_TOKEN) return "JIRA_API_TOKEN environment variable is not set";
      return null;
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description carries the full burden. It only states 'update' but does not disclose side effects, required permissions, reversibility, or return value. For a write operation, this is insufficient.

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 sentence with no extraneous words, conveying the core purpose efficiently.

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 no output schema, no annotations, and a nested parameter (status), the description lacks crucial details like how to obtain transitionId, what happens on success, and error conditions. It is insufficient for reliable tool invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 50%, and the description adds no additional context to parameters. It does not explain that status requires a valid transitionId from get_transitions, nor the meaning of ticketId beyond its schema description.

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 'Update the status of a Jira ticket' clearly states the verb (update) and the resource (status of a Jira ticket). It effectively distinguishes from sibling tools like assign_ticket or update_ticket_fields.

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 is provided on when to use this tool versus alternatives, such as that the status requires a valid transitionId obtained via get_transitions. Prerequisites and context for usage are absent.

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