Repository navigation
Conversation
…g (AGT-4873) Discovery bounded schema size but not how many tools a server could list, so one server returning thousands of tools was cached whole. Each server now keeps at most 256 tools and the whole set at most 1024; a repeated name keeps its first entry. Dropped counts are logged, and the global cap trims in registry order so the result does not depend on which server answered first.
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.
무엇
MAX_DISCOVERED_TOOLS_PER_SERVER(256) /MAX_DISCOVERED_TOOLS(1024) 추가 (MAX_INPUT_SCHEMA_*옆).console.warn으로 남긴다.MCP tool not registered.unreachable이 아니므로 complete 로 캐시된다 (재시도 루프 없음).왜
스키마 크기·속성 수만 자르고 도구 개수와 이름 중복은 막지 않아, 원격 서버 하나가 수천 개 도구를 주면 그대로 캐시·노출됐다 (AGT-4873).
검증
npx vitest run src/mcp/— 3 files / 55 tests 통과 (신규 2: 중복 이름 + 서버별 상한, 서버 6개로 전체 상한·registry 순서 절단).npm run typecheck,oxlint src/mcp0 errors.