Skip to main content
Glama

add_comment

Use this tool to add comments to tickets in mcptix, specifying author, content, status, and type to enhance ticket tracking and task management.

Instructions

Add a comment to a ticket

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
authorNoComment authoragent
contentYesComment content
statusNoComment statusopen
ticket_idYesTicket ID
typeNoComment typecomment

Implementation Reference

  • The main handler function for the 'add_comment' MCP tool. Validates inputs, checks ticket existence, creates a comment object, persists it via database queries, and returns a success response.
    export function handleAddComment(ticketQueries: TicketQueries, args: any): ToolResponse {
      if (!args.ticket_id) {
        throw new Error('Ticket ID is required');
      }
    
      if (!args.content) {
        throw new Error('Comment content is required');
      }
    
      // Check if ticket exists
      const existingTicket = ticketQueries.getTicketById(args.ticket_id);
      if (!existingTicket) {
        throw new Error(`Ticket with ID ${args.ticket_id} not found`);
      }
    
      const author = args.author || 'agent';
    
      // Create comment object
      const comment: Comment = {
        id: `comment-${Date.now()}`,
        ticket_id: args.ticket_id,
        content: args.content,
        author,
        timestamp: new Date().toISOString(),
      };
    
      // Add comment
      const commentId = ticketQueries.addComment(args.ticket_id, comment);
    
      return createSuccessResponse({ id: commentId, success: true });
    }
  • The input schema for the 'add_comment' tool, defining required parameters (ticket_id, content) and optional author, used for tool validation and documentation in MCP.
      name: 'add_comment',
      description: 'Add a comment to a ticket',
      inputSchema: {
        type: 'object',
        properties: {
          ticket_id: {
            type: 'string',
            description: 'Ticket ID',
          },
          content: {
            type: 'string',
            description: 'Comment content (supports markdown)',
          },
          author: {
            type: 'string',
            description: 'Comment author',
            enum: ['developer', 'agent'],
            default: 'agent',
          },
        },
        required: ['ticket_id', 'content'],
      },
    },
  • The switch case that registers and dispatches 'add_comment' tool calls to the corresponding handler function within the MCP tool request handler.
    case 'add_comment':
      return handleAddComment(ticketQueries, args);
  • The import statement that loads the 'add_comment' handler function for use in the MCP tool setup.
    import { handleAddComment } from './handlers/add-comment';
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Add a comment' implies a write/mutation operation, but the description doesn't specify permissions required, whether comments are editable or deletable, rate limits, or what happens on success/failure. This leaves critical behavioral traits unaddressed 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 zero wasted words. It's front-loaded with the core purpose and efficiently communicates the essential action without unnecessary elaboration, making it easy to parse quickly.

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 that this is a mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns, error conditions, or side effects. For a tool that modifies data, more context about behavioral expectations is needed to guide safe and 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?

The description adds no parameter semantics beyond what the input schema provides. With 100% schema description coverage, all parameters (ticket_id, content, author, status, type) are documented in the schema with descriptions, defaults, and enums. The baseline score of 3 is appropriate as the schema does the heavy lifting, but the description doesn't enhance understanding of parameter usage or relationships.

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 a comment') and the target resource ('to a ticket'), which is specific and unambiguous. However, it doesn't differentiate this tool from potential sibling tools like 'update_ticket' that might also handle comments, so it doesn't fully distinguish itself from alternatives.

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. With siblings like 'update_ticket' that might modify tickets, there's no indication of whether this is the primary method for adding comments or if other tools should be preferred in certain contexts. No exclusions or prerequisites are mentioned.

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/ownlytics/mcptix'

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