Mew. Work. Docs

Built-in tools›Files and search

List files

ls
Group
Files and search
Turned on by
Its own switch on the Tools page of Conversation settings.
Approval
Not reviewed: runs without asking, within the limits on this page.
Profile key
tool.ls.description

Lists a folder's contents, and by default its subfolders' contents too, so the model can see how a project is laid out.

Entries are sorted by path, so each folder's contents follow it. Links are listed but not followed.

Limits

A listing goes at most 8 levels deep and stops at 40,000 characters. If it is too long, the deepest level reached is cut first, never a shallower one.

Good to know

  • Folders Git ignores, such as node_modules, are listed but not opened. Outside a Git repository, common dependency and build folders (node_modules, vendor, target, build, dist and similar) are treated the same way. Name such a folder as path to list it in full.
  • .git and other version-control folders are listed but not opened. Name one as path to list it.
  • You can change a recorded ls call in the timeline and run it again with Rerun.

Parameters

ParameterTypeDetails
path required
Path
stringDefault "."
depth
Recursion depth
integer0 lists only the current directory.
Default 1