get_file_contents
Retrieve file contents from a GitHub repository by specifying owner, repo, path, and optional branch. Ideal for accessing and managing code or document data directly.
Instructions
Get contents of a file in a GitHub repository.
Args:
params: Dictionary with file parameters
- owner: Repository owner (username or organization)
- repo: Repository name
- path: Path to file/directory
- branch: Branch to get contents from (optional)
Returns:
MCP response with file content data
Input Schema
Name | Required | Description | Default |
---|---|---|---|
params | Yes |
Input Schema (JSON Schema)
{
"properties": {
"params": {
"title": "Params",
"type": "object"
}
},
"required": [
"params"
],
"title": "get_file_contentsArguments",
"type": "object"
}