Skip to main content
Glama

List Directory

list_directory

Lists directory entries with their type and size, helping you inspect folder contents and identify files versus subdirectories.

Instructions

List directory entries with type and size.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_directory"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNo.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the entire behavioral burden. It discloses that entries come with type and size, but says nothing about whether the listing is recursive, how hidden files or permission errors are handled, or what the response structure looks like. For a filesystem read tool with zero annotation coverage this is a significant gap.

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?

A single short sentence with no wasted wording, and the operation is front-loaded. It is terse to the point of being under-specified, but structurally it is clean.

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 annotations and no output schema, the description must cover behavior, parameters, and usage. It only hints at return contents (type and size) and omits the sole parameter's semantics, recursion behavior, and alternatives, which is not enough for a filesystem-listing tool in this sibling set.

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

Parameters2/5

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

There is one parameter (path) with 0% schema description coverage, and the description never mentions it. The default of "." and whether the path is absolute, relative, or workspace-scoped are left entirely unexplained, so the schema gap is not compensated.

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 states a specific verb and resource ("List directory entries") and names the returned fields (type and size), so the agent knows exactly what operation this is. It does not distinguish itself from siblings like directory_tree or search_files, which is the only thing keeping it from 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?

There is no guidance on when to use this tool rather than directory_tree (recursive listing) or search_files/grep (pattern matching). The agent must infer the choice from the tool names alone, and no prerequisites or exclusions are stated.

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