Skip to main content
Glama

GitHub list repository files

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.

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>"
    },
    "name": "github_list_repository_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.9/5.0
Behavior3/5

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

readOnlyHint=true already declares the safety profile, so the description only needs to add context. It says the result is 'the file tree at a given path' and that a path defaults to root via the schema, but it leaves ambiguous whether listing is recursive, whether output is paginated or truncated, and whether large trees are capped.

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 verb and resource, then guidance, then return shape — nothing extraneous. The middle sentence largely duplicates what the schema descriptions already say, which costs it a point.

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?

A simple four-parameter read tool with no output schema and a readOnly annotation; the description covers purpose, invocation context, and roughly what comes back. Only the shape of the returned tree (flat vs. recursive, fields returned) is left unstated.

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 (path, repo, owner, branch) are already documented including the 'owner/name' combined form. The description restates the owner/owner-name convention rather than adding new meaning, which is the baseline 3 case.

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?

States a specific verb and resource ('List files and directories in a GitHub repository') and implicitly contrasts with github_read_file by framing this as structural discovery before reading specific files. An agent can distinguish it from github_list_repositories and github_search_code without opening any schema.

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?

Gives explicit context for use ('understand a project's structure before reading specific files') and points to the prior github_list_repositories call as the source of the owner value. It does not state when this tool is the wrong choice (e.g., deep recursion vs. search), so it falls just short of full when/when-not guidance.

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.