Skip to main content
Glama
KS-GEN-AI

Jira MCP Server

by KS-GEN-AI

edit_ticket

Modify Jira tickets by updating summary, description, labels, or parent assignment to keep project tracking current.

Instructions

Edit a ticket on Jira on the api /rest/api/3/issue/{issueIdOrKey}. Do not use markdown in any field.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueIdOrKeyYesThe issue id or key
summaryNoThe summary of the ticket
descriptionNoThe description of the ticket
labelsNoThe labels of the ticket
parentNoThe key of the parent ticket (the epic)

Implementation Reference

  • The handler function that executes the tool logic: sends a PUT request to Jira API /rest/api/3/issue/{issueIdOrKey} to update ticket fields including summary, description (in ADF format), labels, and parent.
    async function editTicket(
      issueIdOrKey?: string,
      summary?: string,
      description?: string,
      labels?: string[],
      parent?: string,
    ): Promise<any> {
      try {
        const descriptionToSend = description || 'No description provided';
    
        const jiraDescription =
          description === null
            ? undefined
            : {
                type: 'doc',
                version: 1,
                content: [
                  {
                    type: 'paragraph',
                    content: [
                      {
                        type: 'text',
                        text: descriptionToSend,
                      },
                    ],
                  },
                ],
              };
    
        const parentToSend = parent ? { key: parent } : undefined;
    
        //we create the fields object with only the present fields
        let fields: any = {
          summary: summary,
          labels: labels,
          parent: parentToSend,
        };
    
        if (description) {
          fields['description'] = jiraDescription;
        }
    
        const response = await axios.put(
          `${JIRA_URL}/rest/api/3/issue/${issueIdOrKey}`,
          {
            fields: fields,
          },
          {
            headers: getAuthHeaders().headers,
          },
        );
    
        return response.data;
      } catch (error: any) {
        return {
          error: error.response.data,
        };
      }
    }
  • Input schema and metadata for the 'edit_ticket' tool, defining parameters and requirements.
      name: 'edit_ticket',
      description:
        'Edit a ticket on Jira on the api /rest/api/3/issue/{issueIdOrKey}. Do not use markdown in any field.',
      inputSchema: {
        type: 'object',
        properties: {
          issueIdOrKey: {
            type: 'string',
            description: 'The issue id or key',
          },
          summary: {
            type: 'string',
            description: 'The summary of the ticket',
          },
          description: {
            type: 'string',
            description: 'The description of the ticket',
          },
          labels: {
            type: 'array',
            items: {
              type: 'string',
            },
            description: 'The labels of the ticket',
          },
          parent: {
            type: 'string',
            description: 'The key of the parent ticket (the epic)',
          },
        },
        required: ['issueIdOrKey'],
      },
    },
  • src/index.ts:839-866 (registration)
    Tool registration in the CallToolRequestSchema handler: extracts arguments from request and calls the editTicket handler function.
    case 'edit_ticket':
      const issueIdOrKey: any = request.params.arguments?.issueIdOrKey;
      const summary: any = request.params.arguments?.summary;
      const description: any = request.params.arguments?.description;
      const labels: any = request.params.arguments?.labels;
      const parent: any = request.params.arguments?.parent;
    
      if (!issueIdOrKey) {
        throw new Error('Issue id or key is required');
      }
    
      const response = await editTicket(
        issueIdOrKey,
        summary,
        description,
        labels,
        parent,
      );
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(response, null, 2),
          },
        ],
      };

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, and the description only notes 'Do not use markdown in any field.' It fails to disclose other behavioral traits like authorization needs, idempotency, or side effects of editing fields.

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 very concise (one short sentence plus a note) and front-loaded with purpose. It could be slightly expanded without losing conciseness.

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 and no annotations, the description should provide more context about return values, error handling, or field behavior. The current description is minimal for a tool with 5 parameters.

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; the markdown note is a constraint but not parameter semantics.

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

Purpose4/5

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

The description clearly states it edits a Jira ticket and specifies the API endpoint. However, it does not list the editable fields nor distinguish from siblings like assign_ticket, which also modifies tickets.

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 alternatives such as assign_ticket or create_ticket. The sibling tools list implies specialized tools exist, but no exclusions or context are given.

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