Skip to content

Conversation

colinmollenhour
Copy link
Contributor

@colinmollenhour colinmollenhour commented Aug 20, 2025

Description

This PR adds a new getTaskCommentsWithReplies method to fetch both task comments and their threaded replies in a single call. It extends the existing task comments functionality by nesting replies within their parent comments under a replies array property. This should be far more usable to the end-users than having to perform N additional tool calls and trying to loop over comments and get their replies one by one.

Changes

  • Added getTaskCommentsWithReplies method to TaskServiceComments class
  • Extended ClickUpComment interface to include optional replies property
  • Added corresponding tool definition and handler for the new functionality
  • Updated server registration to include the new tool
  • Updated all necessary imports and exports

Usage

The new method can be called via the get_task_comments_with_replies tool, which takes a taskId parameter and returns comments with their threaded replies nested under each comment's replies property.

Type of Change

  • Tool functionality (new tool, tool modification)
  • MCP integration improvement
  • Bug fix
  • Performance optimization
  • Documentation update
  • API enhancements
  • Security improvement

MCP Server Impact

One tool added

Checklist

  • My code follows the code style of this project
  • I have tested the changes
  • I've verified compatibility with MCP standards
  • All tool schemas are properly documented
  • Service layer changes are backward compatible (or documented if breaking)
  • Rate limiting and error handling tested (if applicable)
  • Security considerations addressed

Testing

I used MCP Inspector and tested with a task that had 21 total comments and dozens of replies in total.

Screenshots (if applicable)

image

Additional Notes

Considered adding a call to get replies for a single comment to mirror the ClickUp API. Perhaps there is a use-case for that, but for my purposes, having all replies in one tool call is immensely more efficient. Also the API calls them threads, but the GUI calls them replies so I prefered to mirror the terminology of the GUI since it is what a user would be more likely to use in a natural language setting.

@colinmollenhour colinmollenhour marked this pull request as ready for review August 20, 2025 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant