git_grep
Search permitted tracked files or a specific commit for literal or regex patterns, returning matches while enforcing repository path deny policies.
Instructions
Search permitted tracked working files or a commit; literal patterns by default. Omit repo_path to use the configured repository. Results and operations are restricted according to project policy.
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": {
"pattern": "<pattern>"
},
"name": "git_grep"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | No | ||
| regex | No | ||
| pattern | Yes | ||
| revision | No | ||
| max_count | No | ||
| repo_path | No | Optional repository root. Omit to use the server's fixed repository. An explicit path must identify that same repository. |