Skip to main content
Glama

add_comment

Add a public comment or internal note to an existing ticket in supported ITSM systems (ServiceNow, Jira, Zendesk, etc.).

Instructions

Add a comment (public or internal) to an existing ticket

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ticket_idYesID of the ticket to comment on
commentYesComment text
internalNoTrue = internal note not visible to end users
systemNoITSM system to usejira

Implementation Reference

  • Business logic function that adds a comment (public or internal) to an existing ticket in the in-memory store.
    function addComment({ ticket_id, comment, internal = false }) {
      const ticket = tickets.get(ticket_id);
      if (!ticket) return { success: false, error: `Ticket ${ticket_id} not found` };
      const commentObj = { text: comment, internal, created_at: new Date().toISOString() };
      ticket.comments.push(commentObj);
      ticket.updated_at = new Date().toISOString();
      tickets.set(ticket_id, ticket);
      return { success: true, comment: commentObj, ticket_id };
    }
  • index.js:290-310 (registration)
    MCP server.tool registration for 'add_comment' with Zod schema and annotation metadata.
    server.tool(
      'add_comment',
      'Add a comment (public or internal) to an existing ticket',
      {
        ticket_id: z.string().describe('ID of the ticket to comment on'),
        comment: z.string().describe('Comment text'),
        internal: z.boolean().default(false).describe('True = internal note not visible to end users'),
        system: systemSchema.optional(),
      },
      {
        title: 'Add Comment',
        readOnlyHint: false,
        destructiveHint: false,
        idempotentHint: false,
        openWorldHint: false,
      },
      async ({ ticket_id, comment, internal }) => {
        const result = addComment({ ticket_id, comment, internal });
        return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
      },
    );
  • Zod input schema for the add_comment tool defining ticket_id, comment, internal, and optional system.
      ticket_id: z.string().describe('ID of the ticket to comment on'),
      comment: z.string().describe('Comment text'),
      internal: z.boolean().default(false).describe('True = internal note not visible to end users'),
      system: systemSchema.optional(),
    },
  • Frontend service helper method that calls the 'add_comment' tool via MCP.
    async addComment(ticketId, comment, internal = false, system = null) {
      return this.callTool('add_comment', {
        ticket_id: ticketId,
        comment,
        internal,
        ...(system && { system }),
      });
    }
Behavior3/5

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

Annotations (readOnlyHint=false, destructiveHint=false) are consistent with a write operation. Description adds the 'public or internal' nuance already present in schema parameter. No additional behavioral traits (e.g., auth requirements, side effects) are disclosed, but annotations cover basic safety profile.

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?

Single sentence, front-loaded, zero fluff. Every word contributes to conveying purpose. Appropriate length for a simple tool.

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?

No output schema exists, but description does not hint at return values or response format. For a comment addition tool, the agent might expect to know if the comment ID is returned. Lacks this 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?

Schema coverage is 100%, so parameters are fully documented. Description adds no extra meaning beyond summarizing the 'internal' parameter. Baseline score of 3 is appropriate as schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states verb 'Add', resource 'comment', and context 'to an existing ticket'. Distinguishes between public and internal comments. Sibling tools (create_ticket, update_ticket) are distinct, so purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Description implies usage for adding comments to existing tickets but does not explicitly state when not to use this tool (e.g., for creating tickets) or mention alternatives like update_ticket. Guidance is inferred rather than explicit.

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

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/madosh/MCP-ITSM'

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