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,distand similar) are treated the same way. Name such a folder aspathto list it in full. .gitand other version-control folders are never entered.- You can change a recorded
lscall in the timeline and run it again with Rerun.
Parameters
| Parameter | Type | Details |
|---|---|---|
path requiredPath | string | Directory to list, relative to the workspace. Default "." |
depthRecursion depth | integer | Recursion depth; 0 lists only the directory itself. Default 1 |