Skip to main content
Glama
koundinya

Zendesk MCP Server

by koundinya

zendesk_get_ticket

Retrieve a specific Zendesk ticket by its ID using the Zendesk MCP Server, enabling efficient access to ticket details for streamlined support management.

Instructions

Get a Zendesk ticket by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ticket_idYesThe ID of the ticket to retrieve

Implementation Reference

  • The handler function for the zendesk_get_ticket tool. It parses the ticket_id, fetches the ticket using the getTicket helper with the global Zendesk client, and returns the result as JSON text or an error message.
    async ({ ticket_id }) => {
      try {
        const result = await getTicket(client, parseInt(ticket_id, 10));
    
        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 for the zendesk_get_ticket tool, defining ticket_id as a string.
    {
      ticket_id: z.string().describe("The ID of the ticket to retrieve"),
    },
  • Registration of the zendesk_get_ticket tool using server.tool, including name, description, input schema, and handler function.
    server.tool(
      "zendesk_get_ticket",
      "Get a Zendesk ticket by ID",
      {
        ticket_id: z.string().describe("The ID of the ticket to retrieve"),
      },
      async ({ ticket_id }) => {
        try {
          const result = await getTicket(client, parseInt(ticket_id, 10));
    
          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
          };
        }
      }
    );
  • Helper function getTicket that wraps the Zendesk client's tickets.show callback API into a Promise to fetch a ticket by ID.
    export async function getTicket(client: any, ticketId: number): Promise<any> {
      return new Promise((resolve, reject) => {
        client.tickets.show(ticketId, (error: Error | undefined, req: any, result: any) => {
          if (error) {
            reject(error);
          } else {
            resolve(result);
          }
        });
      });
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It doesn't mention whether this is a read-only operation, what permissions are required, error handling, or response format. 'Get' implies retrieval, but lacks details on rate limits, authentication needs, or data returned.

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, clear sentence with zero wasted words. It's front-loaded with the core purpose and appropriately sized for a simple retrieval tool, making it efficient for an agent to parse.

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 tool with no annotations and no output schema, the description is inadequate. It doesn't explain what data is returned, error conditions, or behavioral constraints. Given the sibling tools suggest a complex Zendesk API environment, more context is needed for effective use.

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%, so the parameter 'ticket_id' is fully documented in the schema. The description adds no additional meaning beyond implying retrieval by ID, which is already clear from the schema. This meets the baseline for high schema coverage.

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 ('Get') and resource ('a Zendesk ticket by ID'), making the purpose immediately understandable. However, it doesn't differentiate from sibling 'zendesk_get_ticket_details', which appears to serve a similar retrieval function, preventing a perfect score.

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?

No guidance is provided on when to use this tool versus alternatives like 'zendesk_get_ticket_details' or 'zendesk_search'. The description only states what it does, not when it's appropriate, leaving the agent to guess based on tool names alone.

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