List files
list_filesList workspace files and directories by path, with optional glob and depth filters. Use to discover what exists before reading or editing; directories show '/', skips .git, node_modules, .cache.
Instructions
List files and directories inside the workspace, sorted by workspace-relative path. Directories are marked with a trailing '/'. Use this to discover what exists before reading or editing, optionally filtered with a glob pattern. Skips the .git, node_modules and .cache directories and does not follow symbolic links. Do not use it to read content (use read_file) or to search text (use grep).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Directory to list, workspace-relative. Defaults to the workspace root. | |
| limit | No | Maximum number of entries to return. Defaults to 500 and is capped at 5000. | |
| pattern | No | Glob filter such as '*.ts', 'src/**' or '**/*.{js,json}'. Patterns without a slash match the name at any depth. Defaults to all entries. | |
| maxDepth | No | Maximum directory depth to descend. Defaults to 6 and is capped at 12. | |
| workspace | No | Workspace name (see workspace_list). Defaults to the primary workspace. |