Skip to content

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.

Capabilityworkspace.list_files
AreaWorkspace and files
Accessreads only
Reaches—
Rightsnone
Dry runnone

Arguments

ArgumentTypeDescription
languagestringOnly files of this language (LSP id, e.g. python, sql); other for unknown.
limitintegerMaximum number of paths to return (default 1000).minimum 0
offsetintegerMatching paths to skip before the first one returned (default 0), for the next page (SPEC-0006 v59 behaviour 22).minimum 0
globstringComma-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.

Terminal window
ferris-idea call ~/my-project list_files
Input 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"
]
}
}
}