Add non-default find_duplicate tool gated by duplicate_detection flag - #3020
Draft
michaeljacholke wants to merge 1 commit into
Draft
Add non-default find_duplicate tool gated by duplicate_detection flag#3020michaeljacholke wants to merge 1 commit into
michaeljacholke wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a read-only
find_duplicateMCP tool that returns ranked duplicate candidates for an existing issue, gated behind a new opt-induplicate_detectionfeature flag.Why
Enables agents to answer "what likely duplicates this issue?" using GitHub's semantic-similarity endpoint, without adding schema cost to agents that haven't opted into duplicate detection. Semantic ranking stays server-side; the tool is a thin, read-only client.
Closes https://github.com/github/plan-track-agentic-toolkit/issues/690
What changed
find_duplicatetool (Issues toolset, read-only) callingGET /repos/{owner}/{repo}/issues/{issue_number}/semantically_similarduplicate_detectionfeature flag toAllowedFeatureFlags(deliberately not inInsidersFeatureFlagsso it's never implicitly enabled)confidence_threshold→threshold,perPage→per_page,page; omit optional params when unset so the API's high-precision defaults applyscorenullable,confidence,likely_duplicate); surface a clear error for legacy bare-issue responses instead of a success-shaped empty listdocs/feature-flags.mdMCP impact
find_duplicateto the Issues toolset. It is non-default and only registered when theduplicate_detectionfeature flag is enabled via--featuresorX-MCP-Features.Prompts tested (tool changes only)
"Find likely duplicates of issue #123 in octo-org/example""Are there any existing issues that duplicate #456? Only show high-confidence matches"(exercisesconfidence_threshold)"Show the top 5 possible duplicates of issue #789"(exercisesperPage/page)Security / limits
perPage/page.Tool renaming
Lint & tests
./script/lint./script/testDocs
docs/feature-flags.md(documents theduplicate_detectionopt-in and the read-only, single-repositoryfind_duplicatetool). README needs no change — gated tools are intentionally excluded from its tool listing.