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