git_grep
Search tracked repository files for patterns without shell access. Use fixed, basic, or extended regex to locate matches in working, index, or revision states.
Instructions
Search tracked content without invoking a shell.
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": {
"repositoryId": "<repositoryId>",
"pattern": "<pattern>"
},
"name": "git_grep"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| target | No | working | |
| context | No | ||
| pattern | Yes | ||
| revision | No | ||
| patternType | No | fixed | |
| repositoryId | Yes | ID returned by git_list_repositories |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| output | Yes | ||
| truncated | Yes |