git_search_code
Search for specific code patterns within a Git repository using regex or strings, filter by file types, and include contextual lines for better analysis.
Instructions
Search for patterns in repository code.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
case_sensitive | No | Whether the search is case sensitive | |
context_lines | No | Number of context lines to include | |
file_patterns | No | Optional file patterns to filter (e.g., "*.js") | |
pattern | Yes | Search pattern (regex or string) | |
repo_url | Yes | The URL of the Git repository |
Input Schema (JSON Schema)
{
"properties": {
"case_sensitive": {
"default": false,
"description": "Whether the search is case sensitive",
"type": "boolean"
},
"context_lines": {
"default": 2,
"description": "Number of context lines to include",
"type": "integer"
},
"file_patterns": {
"description": "Optional file patterns to filter (e.g., \"*.js\")",
"items": {
"type": "string"
},
"type": "array"
},
"pattern": {
"description": "Search pattern (regex or string)",
"type": "string"
},
"repo_url": {
"description": "The URL of the Git repository",
"type": "string"
}
},
"required": [
"repo_url",
"pattern"
],
"type": "object"
}