Skip to content

Commit 4fb094c

Browse files
committed
feat(mcp): Sort repositories alphabetically for consistent pagination
Fixes #566 - Updated CHANGELOG.md with pagination and filtering changes
1 parent 3eca29e commit 4fb094c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/mcp/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

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)
12+
1013
## [1.0.8] - 2025-11-10
1114

1215
### Fixed

packages/mcp/src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ server.tool(
193193
);
194194
}
195195

196+
// Sort alphabetically for consistent pagination
197+
filtered.sort((a, b) => a.repoName.localeCompare(b.repoName));
198+
196199
// Apply pagination
197200
const startIndex = (pageNumber - 1) * limit;
198201
const endIndex = startIndex + limit;

0 commit comments

Comments
 (0)