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

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is an edit operation (implying mutation) and provides a formatting constraint about markdown, but lacks critical behavioral details: authentication requirements, whether changes are reversible, error handling, rate limits, or what happens to fields not mentioned in the update. For a mutation tool with zero annotation coverage, 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.

Conciseness4/5

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

The description is appropriately concise with two sentences. The first sentence states the core purpose and API endpoint, while the second provides an important formatting constraint. Both sentences earn their place, though the structure could be slightly improved by front-loading more critical behavioral information.

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?

For a mutation tool with 5 parameters, no annotations, and no output schema, the description is incomplete. It lacks information about authentication requirements, error responses, what fields can be edited, whether partial updates are allowed, and the format of successful responses. The markdown constraint is useful but doesn't compensate for the broader gaps in behavioral context.

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 description coverage is 100%, so the schema already documents all 5 parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain parameter relationships, constraints, or usage examples. The baseline of 3 is appropriate when the schema does the heavy lifting, though the description provides no compensatory value.

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 the action ('Edit a ticket') and target resource ('on Jira'), with specific API endpoint context. It distinguishes from siblings like 'create_ticket' by focusing on modification rather than creation. However, it doesn't explicitly differentiate from other edit-like operations that might exist in the sibling set.

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?

The description provides no guidance on when to use this tool versus alternatives like 'create_ticket' or 'assign_ticket'. It mentions 'Do not use markdown in any field' which is a formatting constraint but doesn't address contextual usage scenarios, prerequisites, or exclusions. No explicit when/when-not instructions are present.

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/KS-GEN-AI/jira-mcp-server'

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