Skip to main content
Glama
JurreBrandsenInfoSupport

Zendesk API MCP Server

create_ticket

Submit support tickets via the Zendesk API, specifying subject, comment, priority, status, requester, assignee, group, type, or tags for efficient issue tracking and resolution.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assignee_idNoUser ID of the assignee
commentYesTicket comment/description
group_idNoGroup ID for the ticket
priorityNoTicket priority
requester_idNoUser ID of the requester
statusNoTicket status
subjectYesTicket subject
tagsNoTags for the ticket
typeNoTicket type

Implementation Reference

  • The main handler function for the 'create_ticket' tool. It takes input parameters, constructs the ticket data object, calls zendeskClient.createTicket, and returns a formatted success or error response.
    handler: async ({ subject, comment, priority, status, requester_id, assignee_id, group_id, type, tags, }) => { try { const ticketData = { subject, comment: { body: comment }, priority, status, requester_id, assignee_id, group_id, type, tags, }; const result = await zendeskClient.createTicket(ticketData); return { content: [ { type: "text", text: `Ticket created successfully!\n\n${JSON.stringify( result, null, 2 )}`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error creating ticket: ${error.message}` }, ], isError: true, }; } },
  • Zod schema defining the input parameters for the 'create_ticket' tool, including required subject and comment, and optional fields like priority, status, requester_id, etc.
    schema: { subject: z.string().describe("Ticket subject"), comment: z.string().describe("Ticket comment/description"), priority: z .enum(["urgent", "high", "normal", "low"]) .optional() .describe("Ticket priority"), status: z .enum(["new", "open", "pending", "hold", "solved", "closed"]) .optional() .describe("Ticket status"), requester_id: z.number().optional().describe("User ID of the requester"), assignee_id: z.number().optional().describe("User ID of the assignee"), group_id: z.number().optional().describe("Group ID for the ticket"), type: z .enum(["problem", "incident", "question", "task"]) .optional() .describe("Ticket type"), tags: z.array(z.string()).optional().describe("Tags for the ticket"), },
  • src/server.js:47-52 (registration)
    Registers all tools, including 'create_ticket' (via ticketsTools), with the MCP server using server.tool() for each tool's name, schema, handler, and description.
    // Register each tool with the server allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });
  • Helper method in ZendeskClient that performs the actual API POST request to create a ticket by wrapping the generic request method.
    async createTicket(data) { return this.request("POST", "/tickets.json", { ticket: data }); }

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