Fast Code & Content Search
fs_search_contentSearch directory code and text content for strings or regex patterns, returning precise file, line, column, and context matches.
Instructions
高速搜索目录内代码与文本内容(优先使用 ripgrep 加速,自动回退并发遍历),返回精确文件、行号、列号与上下文行。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"directory": "<directory>",
"query": "<query>"
},
"name": "fs_search_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | 搜索文本或正则表达式 | |
| isRegex | No | 是否按正则表达式匹配 | |
| directory | Yes | 搜索起始目录 | |
| extensions | No | 可选扩展名过滤,如 ["ts", "js"] | |
| maxResults | No | 最大返回匹配条数 | |
| excludeDirs | No | 额外排除的目录名 | |
| contextLines | No | 每条匹配附带的上下文行数 | |
| caseSensitive | No | 是否区分大小写 | |
| includeHidden | No | 是否包含隐藏目录与文件 |