Home / Servers / GitHub API / repos_get_readme_in_directory
Get a repository README for a directory
An MCP tool from the GitHub API server, hosted on mcp.hjlabs.in.
Get a repository README for a directory Gets the README from a repository directory. This endpoint supports the following custom media types. For more information, see "Media types." - **application/vnd.github.raw+json**: Returns the raw… [GET /repos/{owner}/{repo}/readme/{dir}]
Name on the gateway: github_api__repos_get_readme_in_directory · read-only.
Parameters
| Name | Type | Description |
|---|---|---|
owner required | string | The account owner of the repository. The name is not case… |
repo required | string | The name of the repository without the .git extension. The… |
dir required | string | The alternate path to look for a README file |
ref | string | The name of the commit/branch/tag. Default: the repository’s default branch. |
How to call it
Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:
{
"name": "github_api__repos_get_readme_in_directory",
"arguments": {
"owner": "…",
"repo": "…",
"dir": "…"
}
}Or connect the GitHub API server directly, which lists 1,221 tools including this one:
claude mcp add --transport http hj-github-api https://mcp.hjlabs.in/mcp/github-api \
--header "Authorization: Bearer YOUR_API_KEY"Try asking
Use the get a repository readme for a directory tool with owner set to ….