MCP Tools
get_file_tree
Print the directory structure of an indexed repository.
get_file_tree returns an indented tree of all code-relevant files and directories in an indexed repo. Use it as your first step when exploring an unfamiliar codebase, or when search results reference paths you don't recognise.
Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
repo | string | auto | Repository in owner/repo format. Omit to auto-select when only one repo is indexed. | |
branch | string | default | Git branch to inspect. Omit to use the repo's default branch. | |
depth | integer | 4 | Maximum directory depth to display. Clamped to 10. | |
include_hidden | boolean | false | Include hidden directories (those starting with .). |
When to call it
- As your first step when exploring an unfamiliar codebase.
- When you need to understand how files are organised — route structures, component folders, where code lives.
- When
search_coderesults reference paths you don't recognise. - When you're looking for config files, test directories, or assets.
Example
Notes
- The repo must be indexed and in the
readystate — check withlist_repos. - Tree building has a 30-second timeout.