Skip to main content
Glama

list_directory

View directory contents to analyze codebase structure for architectural decision records.

Instructions

List contents of a directory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the directory to list

Implementation Reference

  • Input/output schema definition for the list_directory tool arguments.
    export interface ListDirectoryArgs { directoryPath: string; recursive?: boolean; }
  • Tool registration and metadata in the central TOOL_CATALOG, including input schema, description, category, and related tools.
    TOOL_CATALOG.set('list_directory', { name: 'list_directory', shortDescription: 'List directory contents', fullDescription: 'Lists files and directories in a path.', category: 'file-system', complexity: 'simple', tokenCost: { min: 100, max: 500 }, hasCEMCPDirective: true, // Phase 4.3: Simple tool - directory listing relatedTools: ['read_directory', 'read_file'], keywords: ['directory', 'list', 'files'], requiresAI: false, inputSchema: { type: 'object', properties: { path: { type: 'string', description: 'Path to directory' }, }, required: ['path'], }, });
  • Lists the list_directory tool in the server context generator for LLM awareness under File System Operations.
    { name: 'list_directory', description: 'List directory contents with filtering' },

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/tosin2013/mcp-adr-analysis-server'

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