search_repo
Search local code repositories by content, filename, or module structure. Returns matching lines, file names, or hierarchical service-module-layer with configurable depth and result limits.
Instructions
跨本地代码仓库搜索(内容 / 文件名 / 模块结构)。
mode: content(内容搜索,返回命中行与上下文) / filename(文件名模糊匹配) / modules(列出服务-模块-层结构)。 扫描根目录由 PG_ROOT 指定(默认本仓库根)。max_results 限制命中数量, context 为内容搜索上下文行数,depth 为递归深度。
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": {
"keyword": "<keyword>"
},
"name": "search_repo"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | content | |
| depth | No | ||
| context | No | ||
| keyword | Yes | ||
| max_results | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |