Skip to content

Support sort and comment author filters for get_issue_comments #1047

@benasher44

Description

@benasher44

Describe the feature or problem you’d like to solve

I want to be able to ask for a particular user's most recent comment on an issue. Today, this is hard to get via the MCP for a few reasons:

  1. Comments can be long, which pushes response lengths to sizes that are beyond token limits
  2. This tool call doesn't support sorting, which means you have to fetch all pages and load all comments to find the most recent one
  3. Related to 2, without author filtering, you have to fetch all comments

Proposed solution

If the tool call supported sorting and author filtering, you could make a single tool call to get the most recent comment for a given author.

Example prompts or workflows (for tools/toolsets only)

  1. Get me the most recent update that person X made on an issue I'm tracking
  2. What are the most recent issues that person X commented on in the last 1 week (can first filter issues by updated date, then get their most recent comment on each)
  3. Summarize the most recent comments that X made in repo Y

Additional context

Generally, lack of filtering for get_issue_comments makes it hard to use, given how long comments can be

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions