get_file_contents
Read file contents or list directory in a GitHub repository, with optional branch or tag reference.
Instructions
Read a file or list a directory. Optional ref (branch, tag, sha).
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": {
"owner": "<owner>",
"repo": "<repo>",
"path": "<path>"
},
"name": "get_file_contents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | ||
| repo | Yes | ||
| path | Yes | ||
| ref | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |