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.
| Capability | code.folding_ranges |
|---|---|
| Area | Code insight and refactoring |
| Access | reads only |
| Reaches | — |
| Rights | none |
| Dry run | none |
Arguments
| Argument | Type | Description |
|---|---|---|
pathrequired | string | Workspace-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.
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" } }}