file_search
Perform regex-based content search on remote servers to find error messages in logs or configuration entries, with optional context lines and case sensitivity.
Instructions
在远程服务器上搜索文件内容(grep),适合查找日志中的错误、配置项等
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": {
"server": "<server>",
"path": "<path>",
"pattern": "<pattern>"
},
"name": "file_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 搜索的目标目录或文件路径 | |
| server | Yes | 目标服务器名称 | |
| context | No | 上下文行数 | |
| pattern | Yes | 搜索模式(支持正则表达式) | |
| maxResults | No | 最大结果数 | |
| caseSensitive | No | 是否区分大小写 |