github_read_file
Read the content of ONE named file from a GitHub repository - 'path' is required and names that file. To see what a repository or directory CONTAINS, call github_list_repository_files instead (its 'path' is optional). Prefer the exact owner from github_list_repositories; 'repo' also accepts the combined 'owner/name' form. Use this to inspect Dockerfiles, package.json, CI configs, Helm charts, source code, and other text files. Refuses to read known sensitive files (.env, private keys, etc.).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Required. Path of the single file to read, within the repository (e.g. 'Dockerfile', 'src/index.ts', '.github/workflows/deploy.yml'). To list a directory rather than read a file, use github_list_repository_files. | |
| repo | Yes | Repository name. Also accepts the combined 'owner/name' form. | |
| owner | No | Repository owner (e.g. 'octocat'). Prefer the exact owner from a prior github_list_repositories call. May be omitted when the repository name is unambiguous in this organisation, or embedded in 'repo' as 'owner/name'. | |
| branch | No | Branch name. Defaults to the repository's default branch. | |
| max_lines | No | Maximum number of lines to return, counted from start_line. Omit for no line cap. | |
| start_line | No | 1-based line to start from. With max_lines, pages through files too large to read in one call. Omit to read from the top. |