Skip to main content
Glama
JurreBrandsenInfoSupport

Zendesk API MCP Server

update_ticket

Modify Zendesk support tickets by updating subject, priority, status, assignee, comments, tags, or type to manage customer issues.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTicket ID to update
subjectNoUpdated ticket subject
commentNoInternal (non-public) comment to add
priorityNoUpdated ticket priority
statusNoUpdated ticket status
assignee_idNoUser ID of the new assignee
group_idNoNew group ID for the ticket
typeNoUpdated ticket type
tagsNoUpdated tags for the ticket

Implementation Reference

  • The primary handler function implementing the 'update_ticket' tool logic. It prepares the ticket update data (conditionally including fields and ensuring internal comments) and calls the zendeskClient to perform the update.
    handler: async ({ id, subject, comment, priority, status, assignee_id, group_id, type, tags, }) => { try { const ticketData = {}; if (subject !== undefined) ticketData.subject = subject; if (comment !== undefined) { ticketData.comment = { body: comment, public: false, // Always internal }; } if (priority !== undefined) ticketData.priority = priority; if (status !== undefined) ticketData.status = status; if (assignee_id !== undefined) ticketData.assignee_id = assignee_id; if (group_id !== undefined) ticketData.group_id = group_id; if (type !== undefined) ticketData.type = type; if (tags !== undefined) ticketData.tags = tags; const result = await zendeskClient.updateTicket(id, ticketData); return { content: [ { type: "text", text: `Ticket updated successfully!\n\n${JSON.stringify( result, null, 2 )}`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error updating ticket: ${error.message}` }, ], isError: true, }; } },
  • Zod schema defining the input parameters and validation for the 'update_ticket' tool.
    schema: { id: z.number().describe("Ticket ID to update"), subject: z.string().optional().describe("Updated ticket subject"), comment: z .string() .optional() .describe("Internal (non-public) comment to add"), priority: z .enum(["urgent", "high", "normal", "low"]) .optional() .describe("Updated ticket priority"), status: z .enum(["new", "open", "pending", "hold", "solved", "closed"]) .optional() .describe("Updated ticket status"), assignee_id: z .number() .optional() .describe("User ID of the new assignee"), group_id: z.number().optional().describe("New group ID for the ticket"), type: z .enum(["problem", "incident", "question", "task"]) .optional() .describe("Updated ticket type"), tags: z .array(z.string()) .optional() .describe("Updated tags for the ticket"), },
  • src/server.js:47-52 (registration)
    The registration loop that adds the 'update_ticket' tool (included in allTools via ticketsTools) to the MCP server using server.tool().
    // Register each tool with the server allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });
  • Supporting helper method in ZendeskClient that performs the actual API PUT request to update a ticket.
    async updateTicket(id, data) { return this.request("PUT", `/tickets/${id}.json`, { ticket: data, public: false, }); }

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/JurreBrandsenInfoSupport/zendesk-mcp'

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