feat: repo_tree tool (single-call directory tree) #14
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add a
repo_treetool that returns the full directory tree of a repo (up to configurable depth) in a single call, instead of requiring repeateddir_listcalls per directory.Gitea API
GET /api/v1/repos/{owner}/{repo}/git/trees/{sha}?recursive=trueTool spec
Returns
Flat list of
{path, type (file|dir), size, sha}entries, filtered to max_depth.Required token permission
read:repositoryscope — same as existing tools, no new permissions needed.Risk classification
LOW — read-only.
Motivation
During repo scouting (2026-05-14 session), exploring 6 repos required ~12 separate
dir_listcalls to understand structure. A singlerepo_treecall would have replaced all of them. Critical for efficient agent-driven repo exploration.Implementation notes
.gitinternalsShipped in v0.2.3. Closing during cleanup pass.