Skip to main content
List the contents of a single directory, sorted alphabetically, directories suffixed with /, includes hidden files.

Dependencies

No extra dependencies, available by default.

Parameters

Example output

Output is truncated beyond 500 entries or 50KB.
ls looks at one level only, answering “what is in this directory”. To find a file recursively across directories, use search_files with target=files.

Use Cases

  • Browse project structure
  • Check whether a directory exists and what is in it
  • See what is already alongside a file before writing