Repository navigation
fix(mcp): Page search_issues results with a cursor - #2943
Draft
sentry-junior[bot] wants to merge 1 commit into
Draft
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
search_issues capped limit at 100 and dropped the Link header, so agents could not list every issue matching a query or tell that more existed. Take a cursor input, send it to the issues endpoint, and return nextCursor plus a note when Sentry reports another page. Refs #2942
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Contributor
📊 MCP Server Token Cost ReportSummary
Per-Tool Breakdown
Note: This measures the static overhead of tool definitions sent to LLM clients with every request. Lower is better. MCP Apps viewsEach
The budget applies to raw bytes, and the view's generator fails over it. |
This branch was successfully deployed
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.
search_issuescappedlimitat 100 and threw away Sentry'sLinkheader, so an agent couldn't list every issue that matches a query, or even tell that more existed.search_issuestakes an optionalcursor(the sharedParamCursor) and sends it toGET /organizations/{org}/issues/. Sentry readscursorinbuild_query_params_from_requestand returnsLinkthroughadd_cursor_headers(getsentry/sentrysrc/sentry/api/helpers/group_index/index.py:102-104,src/sentry/api/base.py:648-660).nextCursor(null on the last page) and a note that says how to fetch the next page. Output schemas are open (fix(mcp): List output schemas with open objects #2450), so clients with a cached schema still accept the new key.SentryApiService.listIssuesPagereturns the page plus the next cursor.listIssueskeeps its array return and delegates, soget_issue_detailsandget_replay_detailsdon't change.Left out on purpose: a total count from
X-Hits. For issue search it can be an estimate, so it needs its own call. The same gap forsearch_issue_eventsis #2143.Fixes #2942
via automation
evt_905b9c478746fd9deeb853f85ad7441b· Run IDdispatch_8f3b14aba5f4b40e5fccb126e178352f.--
View Session [Sentry]