Skip to main content
Glama

get_threaded_comments

Retrieve all replies to a parent comment in a threaded format, with pagination to manage large comment sets.

Instructions

Get threaded comments (replies) for a parent comment. Returns comment details with pagination support.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
comment_idYesThe ID of the parent comment
startNoPagination start (timestamp)
start_idNoPagination start ID

Implementation Reference

  • Registration of the 'get_threaded_comments' tool via server.tool(), defining its schema (comment_id required, start and start_id optional) and handler that calls commentsClient.getThreadedComments().
    // Register get_threaded_comments tool
    server.tool(
      'get_threaded_comments',
      'Get threaded comments (replies) for a parent comment. Returns comment details with pagination support.',
      {
        comment_id: z.string().describe('The ID of the parent comment'),
        start: z.number().optional().describe('Pagination start (timestamp)'),
        start_id: z.string().optional().describe('Pagination start ID')
      },
      async ({ comment_id, ...params }) => {
        try {
          const result = await commentsClient.getThreadedComments(comment_id, params);
          return {
            content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
          };
        } catch (error: any) {
          console.error('Error getting threaded comments:', error);
          return {
            content: [{ type: 'text', text: `Error getting threaded comments: ${error.message}` }],
            isError: true
          };
        }
      }
    );
  • Handler function for the 'get_threaded_comments' tool that extracts comment_id and params, calls commentsClient.getThreadedComments(), and returns JSON-stringified result or error.
    async ({ comment_id, ...params }) => {
      try {
        const result = await commentsClient.getThreadedComments(comment_id, params);
        return {
          content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
        };
      } catch (error: any) {
        console.error('Error getting threaded comments:', error);
        return {
          content: [{ type: 'text', text: `Error getting threaded comments: ${error.message}` }],
          isError: true
        };
      }
    }
  • GetThreadedCommentsParams interface defining optional parameters (start and start_id) for pagination of threaded comments.
    export interface GetThreadedCommentsParams {
      start?: number;
      start_id?: string;
    }
  • getThreadedComments method in CommentsClient class that sends a GET request to /comment/{commentId}/reply endpoint with optional pagination params.
    async getThreadedComments(commentId: string, params?: GetThreadedCommentsParams): Promise<{ comments: Comment[] }> {
      return this.client.get(`/comment/${commentId}/reply`, params);
    }
Behavior3/5

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

No annotations provided, so description carries full burden. It mentions 'pagination support' and returns 'comment details', but does not disclose read-only nature, auth requirements, rate limits, or side effects. Moderate transparency.

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?

Two sentences, front-loaded with the primary action, no filler. Every word adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, no annotations, and 3 parameters, the description could elaborate on return structure or pagination mechanics. It is functional but not comprehensive.

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 covers all 3 parameters with descriptions (100% coverage). Description adds no additional meaning beyond the schema, so baseline score of 3 applies.

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 it retrieves threaded comments (replies) for a parent comment, with pagination support. This distinguishes it from sibling tools like 'get_list_comments' which fetch top-level comments, and 'get_chat_view_comments' which are chat-specific.

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?

The description implies usage context (retrieving replies for a specific parent comment) but does not explicitly advise when not to use it or compare with alternatives. For an agent, it's inferable but not 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/nsxdavid/clickup-mcp-server'

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