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
Name | Required | Description | Default |
---|---|---|---|
filters | No | Optional filters to narrow search results | |
includeContent | No | Whether to include full file content in results (default: true) | |
includeSnippet | No | Whether to include code snippets in results (default: true) | |
projectId | Yes | The ID or name of the project to search in | |
searchText | Yes | The text to search for | |
skip | No | Number of results to skip for pagination (default: 0) | |
top | No | Number 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"
}