Skip to main content
Glama

update_ticket

Modify existing support tickets by updating their status, description, or priority level to reflect current progress and requirements.

Instructions

Update an existing ticket (status, description, or priority)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ticketIdYes
statusNo
descriptionNo
priorityNo

Implementation Reference

  • The main execute handler for the 'update_ticket' MCP tool. Validates inputs, calls the API to update the ticket, handles errors, and returns formatted response.
    execute: async (args: {
      ticketId: string;
      status?: string;
      description?: string;
      priority?: string;
    }) => {
      try {
        logger.info('Updating ticket', args);
    
        validateNotEmpty(args.ticketId, 'Ticket ID');
        
        if (args.status) {
          validateEnum(args.status, TicketStatus, 'Status');
        }
        if (args.priority) {
          validateEnum(args.priority, TicketPriority, 'Priority');
        }
    
        const ticket = await apiService.updateTicket({
          id: args.ticketId,
          status: args.status as TicketStatus | undefined,
          description: args.description,
          priority: args.priority as TicketPriority | undefined
        });
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(
                {
                  success: true,
                  message: 'Ticket updated successfully',
                  ticket
                },
                null,
                2
              )
            }
          ]
        };
      } catch (error) {
        logger.error('Failed to update ticket', error);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(
                {
                  success: false,
                  error: error instanceof Error ? error.message : 'Unknown error'
                },
                null,
                2
              )
            }
          ],
          isError: true
        };
      }
    }
  • Zod schema defining the input parameters for the 'update_ticket' tool used in MCP tool registration.
    parameters: z.object({
      ticketId: z.string().describe('ID of the ticket to update'),
      status: z.enum(['open', 'in_progress', 'resolved', 'closed']).optional().describe('New status'),
      description: z.string().optional().describe('Updated description'),
      priority: z.enum(['low', 'medium', 'high', 'urgent']).optional().describe('Updated priority')
    }),
  • src/index.ts:60-67 (registration)
    Registration of the ticket tools (including update_ticket) by calling createTicketTools and merging into the allTools object used by MCP handlers.
    const ticketTools = createTicketTools(apiService);
    const chatbotTools = createChatbotTools(chatbotService);
    const pdfTools = createPDFTools(pdfService);
    
    const allTools = {
      ...ticketTools,
      ...chatbotTools,
      ...pdfTools
  • API service helper method that performs the HTTP PATCH request to update a ticket in the backend.
    async updateTicket(request: UpdateTicketRequest): Promise<Ticket> {
      try {
        const { id, ...updateData } = request;
        const response = await this.client.patch<Ticket>(
          `/api/tickets/${id}`,
          updateData
        );
        logger.info('Ticket updated successfully', { ticketId: id });
        return response.data;
      } catch (error) {
        logger.error('Failed to update ticket', error);
        throw error;
      }
    }
  • TypeScript type definition for UpdateTicketRequest used in the API service layer.
    export interface UpdateTicketRequest {
      id: string;
      status?: TicketStatus;
      description?: string;
      priority?: TicketPriority;
    }
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. While 'update' implies mutation, it doesn't specify whether this requires specific permissions, if changes are reversible, what happens when only some fields are provided, or error conditions. The description mentions what can be updated but not how the update behaves or what the response looks like.

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 a single, efficient sentence that gets straight to the point. It uses minimal words to convey the core functionality. However, it could be slightly more structured by front-loading the most critical information about the required ticketId parameter.

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 4 parameters, 0% schema description coverage, no annotations, and no output schema, the description is inadequate. It doesn't explain the required ticketId parameter, provides minimal behavioral context, and offers no guidance on usage. The description should do much more to compensate for the lack of structured documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning none of the 4 parameters have descriptions in the schema. The description only mentions three parameters (status, description, priority) but omits the required 'ticketId' parameter entirely. This leaves the most critical parameter undocumented and provides minimal semantic context for the optional parameters.

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 verb 'update' and resource 'existing ticket' with specific fields mentioned (status, description, priority). It distinguishes from sibling tools like 'create_ticket' and 'close_ticket' by focusing on modifying existing tickets rather than creating new ones or closing them. However, it doesn't explicitly differentiate from 'get_ticket' or 'list_tickets' beyond the update action.

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. It doesn't mention prerequisites like needing an existing ticket ID, nor does it explain when to use 'update_ticket' versus 'close_ticket' for status changes. There's no context about appropriate use cases or limitations.

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

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