Skip to main content
Glama

comment_list

Retrieve all comments for a specific task in chronological order to track discussion history and decision-making within project management workflows.

Instructions

List all comments on a task in chronological order.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesTask ID

Implementation Reference

  • The handler function that retrieves comments for a specific task from the database.
    function handleCommentList(args: Record<string, unknown>) {
      const db = getDb();
      const taskId = args.task_id as number;
    
      return db
        .prepare('SELECT * FROM comments WHERE task_id = ? ORDER BY created_at ASC')
        .all(taskId);
    }
  • The definition and schema for the 'comment_list' tool.
    {
      name: 'comment_list',
      description: 'List all comments on a task in chronological order.',
      annotations: { title: 'List Comments', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
      inputSchema: {
        type: 'object',
        properties: {
          task_id: { type: 'integer', description: 'Task ID' },
        },
        required: ['task_id'],
      },
    },
  • Registration of the 'comment_list' handler in the handlers mapping.
    export const handlers: Record<string, ToolHandler> = {
      comment_add: handleCommentAdd,
      comment_list: handleCommentList,
    };

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/spranab/saga-mcp'

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