Skip to main content
Glama

List directory contents

repo_tree_list
Read-onlyIdempotent

Lists files and directories at a given repository path for a branch, tag, or commit SHA. Omit the path to browse the repository root.

Instructions

List files and directories at a path. Omit path to list the repository root.

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": {
      "repo": "<repo>",
      "ref": "<ref>"
    },
    "name": "repo_tree_list"
  }
}

Input Schema

NameRequiredDescriptionDefault
refYesBranch, tag or commit SHA
pathNoDirectory path (default: repository root)
repoYesRepository path, e.g. "owner/repo" or "group/subgroup/repo"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=true, so safety and side-effect profile is fully covered without the description. The description adds only the root-default behavior, which is already in the schema, and says nothing about recursion depth, pagination, or ordering of results.

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?

Two short sentences, front-loaded with the core action and then the single optional-parameter rule; there is no redundant or filler wording.

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

Completeness2/5

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

This is a simple read tool with rich annotations and full schema coverage, but there is no output schema, so the description should say something about what a listing entry contains and whether the listing is shallow or recursive. Large-directory behavior (pagination/truncation) is also unaddressed, leaving real gaps for an agent planning a call.

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

Parameters3/5

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

Schema description coverage is 100% and all three parameters (repo, ref, path) are documented in the schema, including the same default-root note the description repeats. The description therefore adds no meaning beyond the structured fields, making the baseline 3 correct.

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

Purpose4/5

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

The description gives a specific verb+resource ('List files and directories') and the scoping parameter ('at a path'), which is enough to distinguish it from repo_file_read or repo_search. It does not explicitly name a sibling or contrast against them, so it falls short of a 5.

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

Usage Guidelines2/5

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

The only guidance is 'Omit `path` to list the repository root', which is a default-value note rather than when-to-use guidance. There is no indication of when to pick this over repo_search, repo_file_read, or repo_get, nor any precondition such as ref validity.

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