Azure DevOps MCP Server

search_code

Locate specific code across repositories within a project. Apply filters like branch, code element, file path, or repository to refine results and include full file content or snippets.

Instructions

Search for code across repositories in a project

Input Schema

NameRequiredDescriptionDefault
filtersNoOptional filters to narrow search results
includeContentNoWhether to include full file content in results (default: true)
includeSnippetNoWhether to include code snippets in results (default: true)
projectIdYesThe ID or name of the project to search in
searchTextYesThe text to search for
skipNoNumber of results to skip for pagination (default: 0)
topNoNumber of results to return (default: 100, max: 1000)

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "filters": { "additionalProperties": false, "description": "Optional filters to narrow search results", "properties": { "Branch": { "description": "Filter by branch names", "items": { "type": "string" }, "type": "array" }, "CodeElement": { "description": "Filter by code element types (function, class, etc.)", "items": { "type": "string" }, "type": "array" }, "Path": { "description": "Filter by file paths", "items": { "type": "string" }, "type": "array" }, "Repository": { "description": "Filter by repository names", "items": { "type": "string" }, "type": "array" } }, "type": "object" }, "includeContent": { "default": true, "description": "Whether to include full file content in results (default: true)", "type": "boolean" }, "includeSnippet": { "default": true, "description": "Whether to include code snippets in results (default: true)", "type": "boolean" }, "projectId": { "description": "The ID or name of the project to search in", "type": "string" }, "searchText": { "description": "The text to search for", "type": "string" }, "skip": { "default": 0, "description": "Number of results to skip for pagination (default: 0)", "minimum": 0, "type": "integer" }, "top": { "default": 100, "description": "Number of results to return (default: 100, max: 1000)", "maximum": 1000, "minimum": 1, "type": "integer" } }, "required": [ "searchText", "projectId" ], "type": "object" }

You must be authenticated.

Other Tools from Azure DevOps MCP Server

Related Tools

ID: vbqbnnzcdd