list_directory
Retrieve and organize directory contents with type annotations. Specify the path to list files and directories, sorted alphabetically, with clear '[DIR]' or '[FILE]' labels. Paths must adhere to allowed directory roots.
Instructions
List the contents of a directory with type annotations.
Args: path (str): Directory path to list (absolute or relative to allowed directories)
Returns: str: Newline-separated list of entries with '[DIR]' or '[FILE]' prefixes, or error message if failed
Note: - Path must be within allowed directory roots - Fails if path is not a directory - Entries are sorted alphabetically - Format: '[DIR] dirname' or '[FILE] filename'
Input Schema
Name | Required | Description | Default |
---|---|---|---|
path | Yes |