search_code
Search code across Azure DevOps repositories in a project to find files, snippets, and content by text query, with filters for repository, branch, path, and code element.
Instructions
Search for code across repositories in a project
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>",
"top": "<top>",
"skip": "<skip>",
"includeSnippet": "<includeSnippet>",
"includeContent": "<includeContent>"
},
"name": "search_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | Yes | Number of results to return (default: 100, max: 1000) | |
| skip | Yes | Number of results to skip for pagination (default: 0) | |
| filters | No | Optional filters to narrow search results | |
| projectId | No | The ID or name of the project to search in (Default: MyProject). If not provided, the default project will be used. | |
| searchText | Yes | The text to search for | |
| includeContent | Yes | Whether to include full file content in results (default: true) | |
| includeSnippet | Yes | Whether to include code snippets in results (default: true) | |
| organizationId | No | The ID or name of the organization (Default: mycompany) |