> ## Documentation Index
> Fetch the complete documentation index at: https://docs.r28.ai/charter/llms.txt
> Use this file to discover all available pages before exploring further.

# git_trees_get

> Read a tree: every path in it with its mode and object SHA. Accepts a branch name as well as a SHA. Set `recursive` to '1' to walk subtrees — check `truncated` on the way back, because GitHub caps a recursive read at 100,000 entries and 7 MB.

<div className="tool-route"><span className="tool-row-method" data-method="GET">GET</span><code>{"https://api.github.com/repos/{owner}/{repo}/git/trees/{treeSha}"}</code></div>

```python github_git_trees_get.py theme={null}
from charter.packs import github

result = await github.git_trees_get.ainvoke({"owner": ..., "repo": ..., "treeSha": ...})
```

<Note>
  Requires `repo`, `read:user`.
</Note>

## Path parameters

<div className="reference-table">
  | Field                                                           | Type     | Description                                                                                                       |
  | --------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------- |
  | `owner` <span className="required" title="required">\*</span>   | `string` | The account owner of the repository. The name is not case sensitive.                                              |
  | `repo` <span className="required" title="required">\*</span>    | `string` | The name of the repository without the `.git` extension. The name is not case sensitive.                          |
  | `treeSha` <span className="required" title="required">\*</span> | `string` | The SHA1 value or ref (branch or tag) name of the tree. A branch name works here, which saves resolving it first. |
</div>

## Query parameters

<div className="reference-table">
  | Field       | Type     | Description                                                                                                                                                                                                                                                                                   |
  | ----------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `recursive` | `string` | Set to '1' to return every object in every subtree, rather than the top level only. GitHub treats *any* value as true here, including '0' and 'false' — omit the parameter to stay shallow. The recursive form is capped at 100,000 entries and 7 MB, and sets `truncated` when it hits that. |
</div>
