Skip to content

folding_ranges

MCP tools › Code insight and refactoring

Folding regions of a workspace file from its syntax tree: 0-based start and end line and kind (block, comment, imports, or a custom region). Each has collapsed_text (the placeholder shown when folded) and, where the placeholder replaces the rest of the first line, keep (characters that stay). doc marks documentation comments and outermost the container Collapse All leaves open.

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

Capabilitycode.folding_ranges
AreaCode insight and refactoring
Accessreads only
Reaches—
Rightsnone
Dry runnone

Arguments

ArgumentTypeDescription
pathrequiredstringWorkspace-relative file path.

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 folding_ranges '{"path":"<string>"}'
Input schema as JSON
{
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"description": "Workspace-relative file path.",
"type": "string"
}
}
}