Skip to main content
Glama

github_list_repository_files

Read-only

List files and directories in a GitHub repository. Prefer the exact owner from github_list_repositories; 'repo' also accepts the combined 'owner/name' form. Returns the file tree at a given path. Use this to understand a project's structure before reading specific files.

Input Schema

NameRequiredDescriptionDefault
pathNoSubdirectory path to list. If not provided, lists the root of the repository.
repoYesRepository name. Also accepts the combined 'owner/name' form.
ownerNoRepository owner (e.g. 'octocat'). Prefer the exact owner from a prior github_list_repositories call. May be omitted when the repository name is unambiguous in this organisation, or embedded in 'repo' as 'owner/name'.
branchNoBranch name. Defaults to the repository's default branch.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

readOnlyHint=true already tells the agent this is a safe read, so the description's burden is lighter. It adds one behavioural detail beyond the annotation ('Returns the file tree at a given path') and clarifies accepted input forms, but says nothing about pagination, file-count limits, or recursive depth—details that matter when listing a large tree. Adequate but not rich.

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

Conciseness4/5

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

Three short sentences, front-loaded with the core purpose, with no filler. The middle parameter-hint sentence is slightly redundant with the schema, which keeps it out of 5 territory, but overall it is tight and well ordered.

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

Completeness4/5

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

There is no output schema, so the description carries the return-value burden and does address it minimally ('Returns the file tree at a given path'). Combined with 100% schema coverage and a read-only annotation, an agent has enough to invoke it correctly; only pagination/truncation behaviour on large repositories is unaddressed.

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%, so all four parameters (repo, owner, path, branch) are already documented, including the 'owner/name' combined form and the default-branch behaviour. The description largely restates that ('Prefer the exact owner from github_list_repositories; repo also accepts the combined owner/name form') without adding format or precedence details beyond the schema, so baseline 3 applies.

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 and resource ('List files and directories in a GitHub repository') plus scope ('the file tree at a given path'), which is unambiguous. It partially differentiates from siblings by tying itself to 'before reading specific files' (github_read_file), but it does not distinguish itself from near-neighbours like workspace_list_files or github_search_code.

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

Usage Guidelines4/5

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

It states a clear usage context ('Use this to understand a project's structure before reading specific files') and references the alternative tool that supplies input, github_list_repositories, for the owner value. It gives no explicit when-not-to-use guidance or contrast against other listing/search tools, so it stops short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources