@esankhan3/code-search-mcp 0.4.10 → 0.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tools/search.js +5 -0
- package/package.json +1 -1
package/dist/tools/search.js
CHANGED
|
@@ -73,6 +73,11 @@ async function handleSearchTool(name, args, ctx) {
|
|
|
73
73
|
};
|
|
74
74
|
const result = await retriever.retrieve(query, {
|
|
75
75
|
maxChunks: maxResults,
|
|
76
|
+
// A search tool returns a fixed COUNT of results; the config token budget
|
|
77
|
+
// is for LLM-context packing and would truncate below maxResults (the
|
|
78
|
+
// benchmark saw ~6.6 of 10 returned). Give maxChunks room to bind while
|
|
79
|
+
// still bounding a pathological all-huge-chunks payload.
|
|
80
|
+
maxTokens: maxResults * 4e3,
|
|
76
81
|
repoFilter: repos,
|
|
77
82
|
mode: modeMap[name]
|
|
78
83
|
});
|