Skip to main content
Glama
KS-GEN-AI

Jira MCP Server

by KS-GEN-AI

delete_ticket

Remove a Jira issue permanently by specifying its ID or key to clean up resolved or obsolete tickets.

Instructions

Delete a ticket on Jira on the api /rest/api/3/issue/{issueIdOrKey}. Do not use markdown in your query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueIdOrKeyYesThe issue id or key

Implementation Reference

  • Core handler function that executes the DELETE request to the Jira API to delete the ticket specified by issueIdOrKey.
    async function deleteTicket(issueIdOrKey: string): Promise<any> {
      try {
        const response = await axios.delete(
          `${JIRA_URL}/rest/api/3/issue/${issueIdOrKey}`,
          {
            headers: getAuthHeaders().headers,
          },
        );
        return response.data;
      } catch (error: any) {
        return {
          error: error.response.data,
        };
      }
    }
  • src/index.ts:142-155 (registration)
    Registers the 'delete_ticket' tool in the list of available tools, including its description and input schema.
      name: 'delete_ticket',
      description:
        'Delete a ticket on Jira on the api /rest/api/3/issue/{issueIdOrKey}. Do not use markdown in your query.',
      inputSchema: {
        type: 'object',
        properties: {
          issueIdOrKey: {
            type: 'string',
            description: 'The issue id or key',
          },
        },
        required: ['issueIdOrKey'],
      },
    },
  • Dispatch handler in the CallToolRequestHandler that handles calls to 'delete_ticket', validates input, invokes deleteTicket, and formats the response.
    case 'delete_ticket': {
      const issueIdOrKey: any = request.params.arguments?.issueIdOrKey;
    
      if (!issueIdOrKey) {
        throw new Error('Issue id or key is required');
      }
    
      const response = await deleteTicket(issueIdOrKey);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(response, null, 2),
          },
        ],
      };
    }
  • Input schema definition for the delete_ticket tool, specifying the required 'issueIdOrKey' parameter.
    inputSchema: {
      type: 'object',
      properties: {
        issueIdOrKey: {
          type: 'string',
          description: 'The issue id or key',
        },
      },
      required: ['issueIdOrKey'],
    },

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations, the description carries full burden for behavioral disclosure. It only states 'Delete a ticket', which implies destructiveness, but does not mention irreversibility, cascade effects, or required permissions. This is insufficient for an agent to understand the impact.

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?

The description is short (two sentences), but the second sentence 'Do not use markdown in your query' is tangential and likely irrelevant to the tool's function, wasting space. It could be removed to improve 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 the tool is destructive and has no output schema or annotations, the description should provide more context about deletion behavior, such as its permanence or effects on related data. The current description is inadequate for safe and informed tool invocation.

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% and the schema already describes the sole parameter 'issueIdOrKey' as 'The issue id or key'. The description adds no additional meaning beyond the schema, so baseline score of 3 is appropriate.

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 'Delete' and the resource 'a ticket on Jira', and includes the API endpoint, which helps differentiate from sibling tools like edit_ticket or create_ticket. However, the extraneous instruction 'Do not use markdown in your query' may confuse the tool's purpose.

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 edit_ticket or assign_ticket. There is no mention of prerequisites, permissions, or situations where deletion is not appropriate.

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