search_code
在 GitHub 全站代码中搜索(默认分支已索引代码)。当用户想定位某个函数/配置/API 的实现位置、查找用法示例时使用,比仓库搜索更精确。支持限定符:repo:owner/name、language:、path:、filename:。注意必须至少包含一个关键词,仅限定符会被拒绝。
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"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | 页码,从 1 开始,默认 1(每页 15 条) | |
| query | Yes | 代码搜索串,如 'useRouter repo:vercel/next.js' 或 'cache_components language:typescript' |