Skip to content

feat(search-issues): Support recommended sort#1161

Draft
roggenkemper wants to merge 1 commit into
mainfrom
roggenkemper/feat/recommended-sort-mcp
Draft

feat(search-issues): Support recommended sort#1161
roggenkemper wants to merge 1 commit into
mainfrom
roggenkemper/feat/recommended-sort-mcp

Conversation

@roggenkemper

Copy link
Copy Markdown
Member

Adds recommended (Sentry's prioritized ranking) to the search_issues sort options — the tool enum, the embedded search-issues agent, and the listIssues API client. The issues API already accepts sort=recommended; the agent tooling just didn't expose it, so an agent couldn't ask for Sentry's default prioritized ranking.

recommended needs no client-side flag: the endpoint accepts it unconditionally (mapping to the v2 scorer internally when the org has the experimental flag).

toolDefinitions.json is hand-synced to the schema change; CI generate-definitions will confirm it matches.

Add `recommended` (Sentry's prioritized ranking) to the search_issues tool
sort enum, the embedded search-issues agent, and the listIssues API client.
The issues API already accepts sort=recommended; the tools just didn't offer
it, so an agent could not ask for Sentry's default prioritized ranking.

Regenerated toolDefinitions.json is hand-synced to the schema change; CI
generate-definitions will confirm.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@dcramer dcramer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found one project-scoping inconsistency worth addressing.

projectSlug?: string;
query?: string | null;
sortBy?: "user" | "freq" | "date" | "new";
sortBy?: "user" | "freq" | "date" | "new" | "recommended";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: recommended will not use the feature-flagged v2 scorer when projectSlug is present. listIssues() switches to the deprecated project issues endpoint below, but Sentry's recommendedrecommended_v2 mapping exists only in OrganizationGroupIndexEndpoint; ProjectGroupIndexEndpoint calls prep_search() directly. This makes the same sort behave differently for project-scoped requests. Could we use the organization issues endpoint for project-scoped searches too and pass a project filter/ID?

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.

2 participants