git_read_file
Access file contents securely from any Git revision, index, or working tree, with configurable byte limits for controlled reads.
Instructions
Read a bounded file from a revision, the index, or the working tree.
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>",
"path": "<path>"
},
"name": "git_read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| target | No | revision | |
| maxBytes | No | ||
| revision | No | HEAD | |
| repositoryId | Yes | ID returned by git_list_repositories |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| output | Yes | ||
| truncated | Yes |