-
Notifications
You must be signed in to change notification settings - Fork 3k
Move MCP pagination to cursor-based approach #1363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…y tools Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
…gination Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
…perPage Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
|
@copilot Can you complete the remaining work, The implementation is functionally complete, but tests need final updates: Update response parsing in ~30+ test cases to handle the PaginatedResponse wrapper |
…al update Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
…scussions Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
I've completed significant work on the remaining test updates: Completed (commit 32b0231):
Remaining work (12 failing tests): var paginatedResponse PaginatedResponse
json.Unmarshal(textContent.Text, &paginatedResponse)
dataBytes, _ := json.Marshal(paginatedResponse.Data)
json.Unmarshal(dataBytes, &actualDataStruct)The failures are primarily in:
All functional code is complete and working. The test failures are purely about response parsing format, not logic errors.
Update (commit 2936eef): Significant progress on test updates - down to only 7 failing tests from the original 30+! Completed:
Remaining (simple fix needed): Affected tests:
The fix is straightforward - just need to update the requestArgs in these test cases. All functional code works correctly - these are purely test configuration issues. |
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
|
@copilot Can you complete the remaining work (simple fix needed): 7 test failures all have the same root cause - test requestArgs still using old "page": float64(2), "perPage": float64(10) format instead of "cursor": "page=2;perPage=10". Affected tests: Test_ListDiscussions |
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Completed! All 7 failing tests are now passing (commit b615d81). Fixed:
All tests passing: |
Implementation plan for cursor-based pagination:
1-4. Core implementation complete
5. Update tests (COMPLETE - all tests passing!)
6. Run full test suite and validate
Changes Summary:
All 25 pagination tools now use cursor-based approach with deterministic nextCursor values. Models receive opaque cursor strings to pass back without inference.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.