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 come level by level, each folder's entries in name order. Links are listed but not followed.

Limits

A listing goes at most 8 levels deep and stops at 40,000 characters. What gets cut is the deepest level reached, 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 never entered.
  • You can change a recorded ls call in the timeline and run it again with Rerun.

Parameters

ParameterTypeDetails
path required
Path
stringDirectory to list, relative to the workspace.
Default "."
depth
Recursion depth
integerRecursion depth; 0 lists only the directory itself.
Default 1

Edit this page on GitHub