get-file-contents
Retrieve file or directory contents from GitHub repositories using owner, repo, and path parameters to access code and project files.
Instructions
Get the contents of a file or directory from a GitHub repository
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 |
|---|---|---|---|
| branch | No | Branch to get contents from | |
| owner | Yes | Repository owner (username or organization) | |
| path | Yes | Path to the file or directory | |
| repo | Yes | Repository name |