Skip to main content
Glama
koundinya

Zendesk MCP Server

by koundinya

zendesk_add_public_note

Add a public comment to a Zendesk ticket using the ticket ID and comment content to provide updates or responses visible to all users.

Instructions

Add a public comment to a Zendesk ticket

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commentYesThe content of the public comment
ticket_idYesThe ID of the ticket to add a comment to

Implementation Reference

  • Handler function that executes the zendesk_add_public_note tool by updating the ticket with a public comment using the Zendesk client.
    async ({ ticket_id, comment }) => {
      try {
        const result = await new Promise((resolve, reject) => {
          (client as any).tickets.update(parseInt(ticket_id, 10), {
            ticket: {
              comment: {
                body: comment,
                public: true
              }
            }
          }, (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 schema defining inputs: ticket_id (string) and comment (string).
    {
      ticket_id: z.string().describe("The ID of the ticket to add a comment to"),
      comment: z.string().describe("The content of the public comment")
    },
  • Registration of the zendesk_add_public_note tool with McpServer, including name, description, schema, and inline handler.
    server.tool(
      "zendesk_add_public_note",
      "Add a public comment to a Zendesk ticket",
      {
        ticket_id: z.string().describe("The ID of the ticket to add a comment to"),
        comment: z.string().describe("The content of the public comment")
      },
      async ({ ticket_id, comment }) => {
        try {
          const result = await new Promise((resolve, reject) => {
            (client as any).tickets.update(parseInt(ticket_id, 10), {
              ticket: {
                comment: {
                  body: comment,
                  public: true
                }
              }
            }, (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
          };
        }
      }
    );
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 the action is 'Add a public comment', implying a write operation, but doesn't mention permissions needed, whether the comment is editable, rate limits, or what happens on success/failure. This leaves significant gaps for a mutation tool.

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 no wasted words. It's front-loaded with the core purpose and efficiently communicates the essential action without unnecessary elaboration.

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 mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after adding the comment (e.g., success confirmation, error handling), nor does it address behavioral aspects like permissions or side effects, leaving the agent with incomplete operational context.

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?

The input schema has 100% description coverage, clearly documenting both parameters. The description doesn't add any additional semantic context beyond what's in the schema (e.g., comment format restrictions, ticket ID validation). 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 ('Add') and target ('a public comment to a Zendesk ticket'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from its sibling 'zendesk_add_private_note', which would be helpful for disambiguation.

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 like 'zendesk_add_private_note' or 'zendesk_update_ticket'. There's no mention of prerequisites, context, or exclusions, leaving the agent to infer usage from the tool name 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