@@ -270,9 +270,10 @@ type MCPTool interface {
270270
271271// SearchCodeInput defines the typed input for the search_code tool.
272272type SearchCodeInput struct {
273- Query string `json:"query"`
274- Limit int `json:"limit,omitempty"`
275- FilePath string `json:"file_path,omitempty"`
273+ Query string `json:"query"`
274+ Limit int `json:"limit,omitempty"`
275+ FilePath string `json:"file_path,omitempty"`
276+ IncludeDocs bool `json:"include_docs,omitempty"`
276277}
277278
278279// SearchCodeOutput defines the typed output for the search_code tool.
@@ -702,6 +703,9 @@ func registerSearchCodeToolTyped(server *mcp.Server, tool *tools.SearchLocalInde
702703 if input .FilePath != "" {
703704 args ["file_path" ] = input .FilePath
704705 }
706+ if input .IncludeDocs {
707+ args ["include_docs" ] = input .IncludeDocs
708+ }
705709
706710 start := time .Now ()
707711 logger .Info ("🛠️ Executing tool '%s' with args: %v" , tool .Name (), args )
@@ -944,6 +948,10 @@ func getToolSchema(toolName string) map[string]interface{} {
944948 "type" : "number" ,
945949 "description" : "Maximum number of results to return (default: 5)" ,
946950 },
951+ "include_docs" : map [string ]interface {}{
952+ "type" : "boolean" ,
953+ "description" : "Optional: Include documentation (markdown, txt, etc.) in search results. Default is false (code only)." ,
954+ },
947955 },
948956 "required" : []string {"query" },
949957 }
@@ -1112,6 +1120,10 @@ func getToolSchema(toolName string) map[string]interface{} {
11121120 "type" : "number" ,
11131121 "description" : "Maximum number of results to return (default: 5)" ,
11141122 },
1123+ "include_docs" : map [string ]interface {}{
1124+ "type" : "boolean" ,
1125+ "description" : "Optional: Include documentation (markdown, txt, etc.) in search results. Default is false (code only)." ,
1126+ },
11151127 },
11161128 "required" : []string {"query" },
11171129 }
0 commit comments