search_code
Search repository files for specific text or code content, filtering by path, branch, or file extension.
Instructions
Search for code/text content in a repository
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": {
"repository": "<repository>",
"searchText": "<searchText>"
},
"name": "search_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | Project name | |
| repository | Yes | Repository name or ID | |
| searchText | Yes | Text to search for in file contents | |
| path | No | Folder path to search in (e.g., "/src") | |
| branch | No | Branch to search (default: default branch) | |
| fileExtension | No | Filter by file extension (e.g., ".cs", ".ts") | |
| top | No | Max results to return |