Skip to main content
Glama

delete_ticket

Remove a ticket from the mcptix MCP server by specifying its ID. This tool helps streamline ticket management within AI-assisted project tracking systems.

Instructions

Delete a ticket

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTicket ID

Implementation Reference

  • The main handler function that executes the 'delete_ticket' tool. It validates the input, checks if the ticket exists, deletes it using the database queries, and returns a success response.
    export function handleDeleteTicket(ticketQueries: TicketQueries, args: any): ToolResponse {
      if (!args.id) {
        throw new Error('Ticket ID is required');
      }
    
      // Check if ticket exists
      const existingTicket = ticketQueries.getTicketById(args.id);
      if (!existingTicket) {
        throw new Error(`Ticket with ID ${args.id} not found`);
      }
    
      // Delete ticket
      const success = ticketQueries.deleteTicket(args.id);
    
      return createSuccessResponse({ id: args.id, success });
    }
  • The input schema definition for the 'delete_ticket' tool, specifying that a ticket ID is required.
    {
      name: 'delete_ticket',
      description: 'Delete a ticket',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'string',
            description: 'Ticket ID',
          },
        },
        required: ['id'],
      },
    },
  • The registration of the 'delete_ticket' tool in the MCP server's request handler switch statement, which routes calls to the handleDeleteTicket function.
    case 'delete_ticket':
      return handleDeleteTicket(ticketQueries, args);
  • The import statement that brings in the delete_ticket handler function for use in the MCP tool setup.
    import { handleDeleteTicket } from './handlers/delete-ticket';
Install Server

Other Tools

Related 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/ownlytics/mcptix'

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