Skip to main content
Glama

list_directory

Browse repository contents without cloning by listing files and directories in a specified path. View structure, types, and sizes for repositories in Bitbucket.

Instructions

List contents of a directory in a repository.

Browse repository structure without cloning.

Args:
    repo_slug: Repository slug
    path: Directory path (empty string for root)
    ref: Branch, tag, or commit hash (default: "main")
    limit: Maximum number of entries (default: 100)

Returns:
    List of files and directories with their types and sizes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_slugYes
pathNo
refNomain
limitNo
Behavior3/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It adequately describes the core behavior (listing directory contents) and mentions the 'without cloning' constraint, which is useful context. However, it doesn't disclose important behavioral traits like whether this is a read-only operation (implied but not stated), potential rate limits, authentication requirements, error conditions, or pagination behavior beyond the 'limit' parameter.

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 perfectly structured and concise. It begins with the core purpose, adds important context in the second sentence, then provides well-organized parameter and return value documentation. Every sentence earns its place, with no wasted words or redundant information.

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?

Given the tool's moderate complexity (4 parameters, no output schema, no annotations), the description is quite complete. It covers purpose, usage context, all parameters with semantics, and return value format. The main gap is the lack of output schema, so the description must describe returns - which it does adequately but could benefit from more detail about the structure of the returned list.

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

Parameters5/5

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

The description provides excellent parameter semantics despite 0% schema description coverage. It clearly explains all 4 parameters: 'repo_slug' (Repository slug), 'path' (Directory path with special case for root), 'ref' (Branch/tag/commit with default), and 'limit' (Maximum entries with default). This fully compensates for the lack of schema descriptions and adds meaningful context beyond just parameter names.

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 clearly states the tool's purpose with specific verbs ('List contents', 'Browse repository structure') and resources ('directory in a repository'). It distinguishes itself from siblings like 'get_file_content' by focusing on directory listing rather than file content retrieval, and from 'list_repositories' by operating within a specific repository's directory structure.

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 about when to use this tool ('Browse repository structure without cloning'), which implicitly suggests it's for exploration rather than file operations. However, it doesn't explicitly state when NOT to use it or name specific alternatives among the many sibling tools (like 'get_file_content' for individual files or 'list_repositories' for repository-level listing).

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/JaviMaligno/mcp-server-bitbucket'

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