Skip to main content
Glama

Gitea: Get tree

gitea_get_tree
Read-only

List a Gitea repository's file tree for a branch, tag, or commit. Use recursive mode to retrieve all paths at once when you don't know them ahead of time.

Instructions

[UNIFIED] List the file tree of a Gitea repository. sha may be a branch name, tag, or commit (default: HEAD). recursive=true returns the entire tree in one payload. Use this instead of issuing many get_file calls when you don't know the paths ahead of time.

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": {
      "site": "<site>",
      "owner": "<owner>",
      "repo": "<repo>"
    },
    "name": "gitea_get_tree"
  }
}

Input Schema

NameRequiredDescriptionDefault
shaNoHEAD
pageNo
repoYes
siteYes
ownerYes
per_pageNo
recursiveNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.14.0

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, so the safety profile is covered. The description adds useful context beyond that — the HEAD default for sha and the fact that recursive=true returns the whole tree in a single payload — but says nothing about pagination behavior, result-size limits, or truncation on large repositories, which matters for a listing tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the core action, then the two most consequential parameters, then the alternative. No filler or restated boilerplate.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and 7 undocumented-in-schema parameters, the description does not tell an agent what a tree entry looks like (path, type, sha) or how pagination interacts with recursion. It is adequate to choose the tool but thin for interpreting results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry the parameter burden, and it only covers 2 of 7 params (sha and recursive). site/owner/repo are self-evident identifiers, but page and per_page are entirely unexplained, including whether they even apply when recursive=true.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('List the file tree of a Gitea repository') and immediately names the sibling it replaces ('get_file'), so an agent can distinguish it from gitea_get_file and gitea_get_branch without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit substitution rule: use this instead of many get_file calls when the paths are not known in advance. That is a concrete, actionable condition that maps directly onto a decision an agent faces in this toolset.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools