mirror of
https://github.com/lukaszraczylo/filepuff-mcp.git
synced 2026-10-15 05:37:37 +00:00
perf(tools): lower default result sizes to cut response tokens
The default limits let broad queries flood the model context. This change sets smaller defaults. An explicit parameter still overrides each one. - file_search: max_results 1000 to 50, context_lines 2 to 0. - ast_query: max_results 100 to 50. - ast_query compact output omits the node type unless verbose is set. On a fixed seven-call suite, response size fell from 198529 to 61960 bytes.
This commit is contained in:
@@ -136,7 +136,7 @@ func (s *Server) registerTools() {
|
||||
mcp.Description("Treat pattern as regex (default: true)"),
|
||||
),
|
||||
mcp.WithNumber("context_lines",
|
||||
mcp.Description("Number of context lines around matches (default: 2)"),
|
||||
mcp.Description("Number of context lines around matches (default: 0)"),
|
||||
),
|
||||
mcp.WithNumber("max_results",
|
||||
mcp.Description("Maximum number of results to return (page size for pagination)"),
|
||||
@@ -252,7 +252,7 @@ func (s *Server) registerTools() {
|
||||
mcp.WithStringItems(),
|
||||
),
|
||||
mcp.WithNumber("max_results",
|
||||
mcp.Description("Maximum number of results to return (default: 100, page size for pagination)"),
|
||||
mcp.Description("Maximum number of results to return (default: 50, page size for pagination)"),
|
||||
),
|
||||
mcp.WithString("format",
|
||||
mcp.Description("Output format: \"compact\" (default, one line per match), \"verbose\" (full code+captures), \"location\" (file:line only)"),
|
||||
|
||||
Reference in New Issue
Block a user