You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(mcp): Add pagination and filtering to list_repos tool (#614)
* feat(mcp): Add pagination and filtering to list_repos tool
Fixes#566
- Add query parameter to filter repositories by name
- Add pageNumber and limit parameters for pagination
- Include pagination info in response when applicable
- Add listReposRequestSchema for request validation
- Update README with new list_repos parameters
* feat(mcp): Sort repositories alphabetically for consistent pagination
Fixes#566
- Updated CHANGELOG.md with pagination and filtering changes
---------
Co-authored-by: Brendan Kellam <bshizzle1234@gmail.com>
Copy file name to clipboardExpand all lines: packages/mcp/CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
+
### Added
11
+
- Added pagination and filtering to `list_repos` tool to handle large repository lists efficiently and prevent oversized responses that waste token context. [#614](https://github.com/sourcebot-dev/sourcebot/pull/614)
"Lists all repositories in the organization. If you receive an error that indicates that you're not authenticated, please inform the user to set the SOURCEBOT_API_KEY environment variable.",
169
-
async()=>{
169
+
"Lists repositories in the organization with optional filtering and pagination. If you receive an error that indicates that you're not authenticated, please inform the user to set the SOURCEBOT_API_KEY environment variable.",
text: `No results on page ${pageNumber}. Total matching repositories: ${filtered.length}`,
217
+
});
218
+
}elseif(filtered.length>endIndex){
219
+
content.push({
220
+
type: "text",
221
+
text: `Showing ${paginated.length} repositories (page ${pageNumber}). Total matching: ${filtered.length}. Use pageNumber ${pageNumber+1} to see more.`,
0 commit comments