Skip to main content
Glama

get_ticket

Retrieve detailed support ticket information from FitSlot by providing the ticket ID to access specific case details and status updates.

Instructions

Get detailed information about a specific ticket

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ticketIdYes

Implementation Reference

  • MCP tool definition for 'get_ticket' including description, input schema (Zod), and execute handler that validates ticketId, fetches ticket via apiService.getTicket, formats response as JSON text content.
    get_ticket: {
      description: 'Get detailed information about a specific ticket',
      parameters: z.object({
        ticketId: z.string().describe('ID of the ticket to retrieve')
      }),
      execute: async (args: { ticketId: string }) => {
        try {
          logger.info('Getting ticket details', args);
    
          validateNotEmpty(args.ticketId, 'Ticket ID');
    
          const ticket = await apiService.getTicket(args.ticketId);
    
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify(
                  {
                    success: true,
                    ticket
                  },
                  null,
                  2
                )
              }
            ]
          };
        } catch (error) {
          logger.error('Failed to get ticket', error);
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify(
                  {
                    success: false,
                    error: error instanceof Error ? error.message : 'Unknown error'
                  },
                  null,
                  2
                )
              }
            ],
            isError: true
          };
        }
      }
    },
  • src/index.ts:60-68 (registration)
    Registers ticket tools (including get_ticket) by calling createTicketTools and merging into allTools object used in MCP server's listTools and callTool request handlers.
    const ticketTools = createTicketTools(apiService);
    const chatbotTools = createChatbotTools(chatbotService);
    const pdfTools = createPDFTools(pdfService);
    
    const allTools = {
      ...ticketTools,
      ...chatbotTools,
      ...pdfTools
    };
  • Helper method in FitSlotAPIService that performs the actual HTTP GET request to retrieve ticket details from the FitSlot API endpoint `/api/tickets/${ticketId}`.
    async getTicket(ticketId: string): Promise<Ticket> {
      try {
        const response = await this.client.get<Ticket>(`/api/tickets/${ticketId}`);
        logger.info('Ticket retrieved', { ticketId });
        return response.data;
      } catch (error) {
        logger.error('Failed to get ticket', error);
        throw error;
      }
    }

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/osmarsant/fitslot-mcp'

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