mirror of
https://github.com/lukaszraczylo/filepuff-mcp.git
synced 2026-10-14 05:30:19 +00:00
feat(search): bound default result count and add include_hidden
Two file_search gaps: - max_results defaulted to 0 (unbounded), so a broad pattern returned every match — unbounded memory + token blowup. The configured MaxSearchResults (default 1000) existed but was dead; wire it as the builtIn default. Explicit max_results still wins, and the cursor footer pages the rest. - search.Request.IncludeHidden was a dead field with no tool param. Add an include_hidden bool (default false) so dotfiles (.github/, etc.) are searchable.
This commit is contained in:
@@ -129,6 +129,9 @@ func (s *Server) registerTools() {
|
||||
mcp.WithBoolean("ignore_case",
|
||||
mcp.Description("Case insensitive search"),
|
||||
),
|
||||
mcp.WithBoolean("include_hidden",
|
||||
mcp.Description("Search hidden files and directories (dotfiles like .github/). Default: false."),
|
||||
),
|
||||
mcp.WithBoolean("regex",
|
||||
mcp.Description("Treat pattern as regex (default: true)"),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user