Skip to main content
Glama
koundinya
by koundinya

zendesk_update_ticket

Modify Zendesk ticket properties such as priority, status, assignee, tags, subject, and type by specifying the ticket ID.

Instructions

Update a Zendesk ticket's properties

Input Schema

NameRequiredDescriptionDefault
assignee_idNoThe ID of the agent to assign the ticket to
priorityNoThe new priority of the ticket
statusNoThe new status of the ticket
subjectNoThe new subject of the ticket
tagsNoTags to set on the ticket (replaces existing tags)
ticket_idYesThe ID of the ticket to update
typeNoThe new type of the ticket

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "assignee_id": { "description": "The ID of the agent to assign the ticket to", "type": "string" }, "priority": { "description": "The new priority of the ticket", "enum": [ "low", "normal", "high", "urgent" ], "type": "string" }, "status": { "description": "The new status of the ticket", "enum": [ "new", "open", "pending", "hold", "solved", "closed" ], "type": "string" }, "subject": { "description": "The new subject of the ticket", "type": "string" }, "tags": { "description": "Tags to set on the ticket (replaces existing tags)", "items": { "type": "string" }, "type": "array" }, "ticket_id": { "description": "The ID of the ticket to update", "type": "string" }, "type": { "description": "The new type of the ticket", "enum": [ "problem", "incident", "question", "task" ], "type": "string" } }, "required": [ "ticket_id" ], "type": "object" }

Implementation Reference

  • The handler function for zendesk_update_ticket that constructs the update data from inputs and calls the Zendesk tickets.update API.
    async ({ ticket_id, subject, status, priority, type, assignee_id, tags }) => { try { const ticketData: any = { ticket: {} }; // Only add properties that are provided if (subject) ticketData.ticket.subject = subject; if (status) ticketData.ticket.status = status; if (priority) ticketData.ticket.priority = priority; if (type) ticketData.ticket.type = type; if (assignee_id) ticketData.ticket.assignee_id = parseInt(assignee_id, 10); if (tags) ticketData.ticket.tags = tags; const result = await new Promise((resolve, reject) => { (client as any).tickets.update(parseInt(ticket_id, 10), ticketData, (error: Error | undefined, req: any, result: any) => { if (error) { console.log(error); reject(error); } else { resolve(result); } }); }); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message || 'Unknown error occurred'}` }], isError: true }; } }
  • Zod input schema defining parameters for updating a Zendesk ticket.
    { ticket_id: z.string().describe("The ID of the ticket to update"), subject: z.string().optional().describe("The new subject of the ticket"), status: z.enum(['new', 'open', 'pending', 'hold', 'solved', 'closed']).optional().describe("The new status of the ticket"), priority: z.enum(['low', 'normal', 'high', 'urgent']).optional().describe("The new priority of the ticket"), type: z.enum(['problem', 'incident', 'question', 'task']).optional().describe("The new type of the ticket"), assignee_id: z.string().optional().describe("The ID of the agent to assign the ticket to"), tags: z.array(z.string()).optional().describe("Tags to set on the ticket (replaces existing tags)") },
  • Full registration of the zendesk_update_ticket tool with MCP server using server.tool, including description, schema, and inline handler.
    server.tool( "zendesk_update_ticket", "Update a Zendesk ticket's properties", { ticket_id: z.string().describe("The ID of the ticket to update"), subject: z.string().optional().describe("The new subject of the ticket"), status: z.enum(['new', 'open', 'pending', 'hold', 'solved', 'closed']).optional().describe("The new status of the ticket"), priority: z.enum(['low', 'normal', 'high', 'urgent']).optional().describe("The new priority of the ticket"), type: z.enum(['problem', 'incident', 'question', 'task']).optional().describe("The new type of the ticket"), assignee_id: z.string().optional().describe("The ID of the agent to assign the ticket to"), tags: z.array(z.string()).optional().describe("Tags to set on the ticket (replaces existing tags)") }, async ({ ticket_id, subject, status, priority, type, assignee_id, tags }) => { try { const ticketData: any = { ticket: {} }; // Only add properties that are provided if (subject) ticketData.ticket.subject = subject; if (status) ticketData.ticket.status = status; if (priority) ticketData.ticket.priority = priority; if (type) ticketData.ticket.type = type; if (assignee_id) ticketData.ticket.assignee_id = parseInt(assignee_id, 10); if (tags) ticketData.ticket.tags = tags; const result = await new Promise((resolve, reject) => { (client as any).tickets.update(parseInt(ticket_id, 10), ticketData, (error: Error | undefined, req: any, result: any) => { if (error) { console.log(error); reject(error); } else { resolve(result); } }); }); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message || 'Unknown error occurred'}` }], isError: true }; } } );

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/koundinya/zd-mcp-server'

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