get_repository_tree
Retrieve a GitHub repository's directory structure and file listing by SHA or branch name. Use recursive mode to obtain complete nested file trees for comprehensive repository analysis.
Instructions
Get a repository tree (directory listing) by SHA or branch name. Set recursive=True to get the full nested file tree.
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>",
"tree_sha": "<tree_sha>"
},
"name": "get_repository_tree"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | Repository owner | |
| repo | Yes | Repository name | |
| tree_sha | Yes | SHA of the tree, commit, or branch name (e.g. 'main') | |
| recursive | No | Recursively get all nested trees |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |