list_directory
View directory contents to analyze codebase structure for architectural decision records.
Instructions
List contents of a directory
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the directory to list |
Implementation Reference
- src/types/tool-arguments.ts:189-192 (schema)Input/output schema definition for the list_directory tool arguments.export interface ListDirectoryArgs { directoryPath: string; recursive?: boolean; }
- src/tools/tool-catalog.ts:1066-1084 (registration)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' },