list_files
MCP tools › Workspace and files
List project files (relative paths, sorted). Build output and VCS metadata are excluded. At most limit paths (default 1000) from offset (default 0) on; when matching paths are left out after the last one returned, a second content block says so: truncated, total, offset, returned and next_offset.
Its results carry text from files: the client is told to treat that as data, never as instructions.
| Capability | workspace.list_files |
|---|---|
| Area | Workspace and files |
| Access | reads only |
| Reaches | — |
| Rights | none |
| Dry run | none |
Arguments
| Argument | Type | Description |
|---|---|---|
language | string | Only files of this language (LSP id, e.g. python, sql); other for unknown. |
limit | integer | Maximum number of paths to return (default 1000).minimum 0 |
offset | integer | Matching paths to skip before the first one returned (default 0), for the next page
(SPEC-0006 v59 behaviour 22).minimum 0 |
glob | string | Comma-separated patterns with * and ? (* also crosses /): one with a / is matched
against the workspace-relative path, one without against the file name (SPEC-0006 v56
behaviour 9), e.g. *.rs or src/*Test.java. |
Call it from a shell
ferris-idea call runs one tool with the rights and safe mode of ferris-idea mcp. Replace the folder and the placeholder values.
ferris-idea call ~/my-project list_filesInput schema as JSON
{ "type": "object", "properties": { "language": { "description": "Only files of this language (LSP id, e.g. `python`, `sql`); `other` for unknown.", "type": [ "string", "null" ] }, "limit": { "description": "Maximum number of paths to return (default 1000).", "type": [ "integer", "null" ], "minimum": 0 }, "offset": { "description": "Matching paths to skip before the first one returned (default 0), for the next page\n(SPEC-0006 v59 behaviour 22).", "type": [ "integer", "null" ], "minimum": 0 }, "glob": { "description": "Comma-separated patterns with `*` and `?` (`*` also crosses `/`): one with a `/` is matched\nagainst the workspace-relative path, one without against the file name (SPEC-0006 v56\nbehaviour 9), e.g. `*.rs` or `src/*Test.java`.", "type": [ "string", "null" ] } }}