list_dir
Scan and retrieve all non-gitignored files and directories in a specified path, optionally with recursion, returning structured JSON output. Part of the Serena MCP Server for enhanced codebase management.
Instructions
Lists all non-gitignored files and directories in the given directory (optionally with recursion). Returns a JSON object with the names of directories and files within the given directory.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
max_answer_chars | No | If the output is longer than this number of characters, no content will be returned. Don't adjust unless there is really no other way to get the content required for the task. | |
recursive | Yes | Whether to scan subdirectories recursively. | |
relative_path | Yes | The relative path to the directory to list; pass "." to scan the project root. |