Skip to main content
Glama

list_directory

List files and folders in a GitHub repository directory to explore project structure at any branch or path.

Instructions

List contents of a directory in a repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
repoYes
ownerYes
branchNo
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It implies a read-only operation but does not disclose details such as error behavior on non-existent paths, whether entries include only names or full metadata, or how empty path and branch parameters behave. The description adds the repository context but lacks deeper behavioral information.

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?

The description is a single, clear sentence with no wasted words. It is appropriately front-loaded and concise, stating exactly what the tool does.

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?

With no output schema and no annotations, the description is too sparse to guide correct invocation. It does not explain parameter semantics, return values, or how to specify a nested directory vs. the repository root. Sibling tools like get_file exist, but the description does not help an agent choose between them.

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

Parameters1/5

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

Schema description coverage is 0%, and the description does not explain any of the four parameters. It does not clarify that 'path' is a directory path relative to the repo root, that 'branch' is optional, or the format of owner/repo. The description fails to compensate for the lack of schema detail.

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 uses the specific verb 'List' and identifies the resource as 'contents of a directory in a repository'. This clearly distinguishes it from sibling tools like list_repos (repositories) and list_branches (branches).

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?

The description provides clear context: use this tool when you need to list a directory's contents within a repository. It does not explicitly mention when not to use it or name alternatives such as get_file, but the intended scenario is unambiguous.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JessicaTemplet/github-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server