Skip to main content
Glama
koundinya

Zendesk MCP Server

by koundinya

zendesk_create_ticket

Create a Zendesk ticket with defined subject, description, priority, status, type, and tags to manage support requests effectively.

Instructions

Create a new Zendesk ticket

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionYesThe initial description or comment for the ticket
priorityNoThe priority of the ticket
statusNoThe status of the ticket
subjectYesThe subject of the ticket
tagsNoTags to add to the ticket
typeNoThe type of the ticket

Implementation Reference

  • The handler function that executes the zendesk_create_ticket tool: constructs ticket data from inputs and calls the Zendesk API to create the ticket.
    async ({ subject, description, priority, status, type, tags }) => {
      try {
        const ticketData: any = {
          ticket: {
            subject,
            comment: { body: description },
          }
        };
    
        if (priority) ticketData.ticket.priority = priority;
        if (status) ticketData.ticket.status = status;
        if (type) ticketData.ticket.type = type;
        if (tags) ticketData.ticket.tags = tags;
    
        const result = await new Promise((resolve, reject) => {
          (client as any).tickets.create(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
        };
      }
    }
  • Input schema (using Zod) defining parameters for the zendesk_create_ticket tool.
    {
      subject: z.string().describe("The subject of the ticket"),
      description: z.string().describe("The initial description or comment for the ticket"),
      priority: z.enum(['low', 'normal', 'high', 'urgent']).optional().describe("The priority of the ticket"),
      status: z.enum(['new', 'open', 'pending', 'hold', 'solved', 'closed']).optional().describe("The status of the ticket"),
      type: z.enum(['problem', 'incident', 'question', 'task']).optional().describe("The type of the ticket"),
      tags: z.array(z.string()).optional().describe("Tags to add to the ticket")
    },
  • Registration of the zendesk_create_ticket tool on the MCP server, including name, description, input schema, and handler.
    server.tool(
      "zendesk_create_ticket",
      "Create a new Zendesk ticket",
      {
        subject: z.string().describe("The subject of the ticket"),
        description: z.string().describe("The initial description or comment for the ticket"),
        priority: z.enum(['low', 'normal', 'high', 'urgent']).optional().describe("The priority of the ticket"),
        status: z.enum(['new', 'open', 'pending', 'hold', 'solved', 'closed']).optional().describe("The status of the ticket"),
        type: z.enum(['problem', 'incident', 'question', 'task']).optional().describe("The type of the ticket"),
        tags: z.array(z.string()).optional().describe("Tags to add to the ticket")
      },
      async ({ subject, description, priority, status, type, tags }) => {
        try {
          const ticketData: any = {
            ticket: {
              subject,
              comment: { body: description },
            }
          };
    
          if (priority) ticketData.ticket.priority = priority;
          if (status) ticketData.ticket.status = status;
          if (type) ticketData.ticket.type = type;
          if (tags) ticketData.ticket.tags = tags;
    
          const result = await new Promise((resolve, reject) => {
            (client as any).tickets.create(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
          };
        }
      }
    );
  • Zendesk client instance created from environment variables, used by the zendesk_create_ticket handler.
    const client = zendesk.createClient({
      username: process.env.ZENDESK_EMAIL as string,
      token: process.env.ZENDESK_TOKEN as string,
      remoteUri: `https://${process.env.ZENDESK_SUBDOMAIN}.zendesk.com/api/v2`,
    });
  • src/index.ts:34-34 (registration)
    Top-level call to register all Zendesk tools, including zendesk_create_ticket, on the MCP server.
    zenDeskTools(server);
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. It states 'Create' which implies a write/mutation operation, but doesn't disclose critical traits like authentication requirements, rate limits, whether the creation is irreversible, or what happens on success/failure. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core purpose without unnecessary words. It's appropriately sized and front-loaded, with every word earning its place. No structural issues or redundancy are present.

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?

Given this is a mutation tool (ticket creation) with no annotations, no output schema, and 6 parameters, the description is insufficiently complete. It doesn't address behavioral aspects like authentication needs, error handling, or what the tool returns. While the schema covers parameters well, the overall context for safe and effective use is lacking.

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

Parameters3/5

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

Schema description coverage is 100%, with all 6 parameters well-documented in the schema itself (including descriptions and enums for 3 parameters). The description adds no additional parameter information beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.

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 action ('Create') and resource ('new Zendesk ticket'), making the purpose immediately understandable. It distinguishes itself from sibling tools like 'zendesk_update_ticket' by specifying creation rather than modification. However, it doesn't explicitly differentiate from other creation-related tools (e.g., notes), though those are clearly different operations.

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 (e.g., authentication needs), when to choose this over 'zendesk_update_ticket' for modifications, or how it relates to sibling tools like 'zendesk_add_private_note' for ticket interactions. Usage is implied but not explicitly stated.

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

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