ado_git_search_code
Search code across Azure DevOps repositories to locate matching files with paths, repository names, and character offsets. Optionally scope to a project or repository.
Instructions
Search for code across Azure DevOps repositories. Returns matching files with paths, repository names, and character-offset positions of each match within the file. To read the matched text, fetch the file via the repository API. Optionally scope to a project or specific repository. Does NOT search work items or wiki — use ado_workitems_query for work item search.
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": {
"searchText": "<searchText>"
},
"name": "ado_git_search_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | Max results (default 25, max 100) | |
| project | No | Scope search to a specific project. Searches all projects if omitted. | |
| searchText | Yes | Search keywords or phrases. Supports Azure DevOps search syntax. | |
| repositoryName | No | Scope search to a specific repository name |