Skip to content

project_tree

MCP tools › Workspace and files

The project tree of the running Ferris IDEA window. list (default) returns compact_middle_packages, the view and the visible rows in order (name, depth, kind, selected, workspace-relative path, expanded, project role, and folders for compacted rows, whose path is the innermost folder). expand, collapse, select, expand_all (at most 200 folders) and collapse_all change the view and need the ui right; compact toggles Compact Middle Packages in the IDE settings and needs settings. Served by the window over HTTP; unavailable over stdio.

Its results carry text from files: the client is told to treat that as data, never as instructions.

Capabilityworkspace.project_tree
AreaWorkspace and files
Accesschanges settings, ide
Reaches—
Rightsui, settings
Dry runnone

Arguments

ArgumentTypeDescription
actionstringlist (default), expand, collapse, select, compact, expand_all or collapse_all.
pathstringFor expand, collapse and select: the file or folder, workspace-relative or absolute. Any folder of a compacted row means that row. For expand_all: the folder to open with every folder below it; without it the selected folder, as the header button.
onbooleanFor compact: whether "Compact Middle Packages" is on.

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 project_tree
Input schema as JSON
{
"type": "object",
"properties": {
"action": {
"description": "`list` (default), `expand`, `collapse`, `select`, `compact`, `expand_all` or\n`collapse_all`.",
"type": [
"string",
"null"
],
"default": null
},
"path": {
"description": "For `expand`, `collapse` and `select`: the file or folder, workspace-relative or absolute.\nAny folder of a compacted row means that row. For `expand_all`: the folder to open with\nevery folder below it; without it the selected folder, as the header button.",
"type": [
"string",
"null"
],
"default": null
},
"on": {
"description": "For `compact`: whether \"Compact Middle Packages\" is on.",
"type": [
"boolean",
"null"
],
"default": null
}
}
}