search_code_content
Search for specific content within local project code using keywords or regex, filter by file types, and retrieve results with context lines for analysis.
Instructions
在项目代码中搜索指定内容,支持正则表达式
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": {
"query": "<query>"
},
"name": "search_code_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| caseSensitive | No | 是否区分大小写 | |
| contextLines | No | 返回匹配行前后的上下文行数 | |
| fileTypes | No | 文件类型过滤,如 ['.ts', '.tsx', '.js'] | |
| maxResults | No | 最大结果数量 | |
| query | Yes | 搜索关键词或正则表达式 | |
| useRegex | No | 是否启用正则表达式模式 |