Skip to content

document_symbols

MCP tools › Code insight and refactoring

Symbols of a workspace file (functions, types, fields, …) in document order with kind, line and nesting depth, from its language server. For a Python file each function and method carries its parameter list in detail, such as (a, b=2, *args, **kw), and parameters and local variables of functions are left out. An HTML file lists its elements nested as in the document, kind element, each named with its id and classes (main#prices.card) and with the href of a link or a and the src of an img or script as detail, from Ferris IDEA's own syntax tree without a server.

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

Capabilitycode.document_symbols
AreaCode insight and refactoring
Accessreads only
Reachesprocess
Rightsnone
Dry runnone

Arguments

ArgumentTypeDescription
pathrequiredstringWorkspace-relative file path.
structurebooleanThe File Structure popup's view (SPEC-0079 v4): no package symbols, ordered by kind and name below each parent, anonymous classes and lambdas left out unless asked for.
anonymousbooleanWith structure: keep anonymous classes.
lambdasbooleanWith structure: keep lambdas.
inheritedbooleanAdd the members each type inherits from supertypes in project files, with inherited_from and 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 document_symbols '{"path":"<string>"}'
Input schema as JSON
{
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"description": "Workspace-relative file path.",
"type": "string"
},
"structure": {
"description": "The File Structure popup's view (`SPEC-0079` v4): no package symbols, ordered by kind and\nname below each parent, anonymous classes and lambdas left out unless asked for.",
"type": [
"boolean",
"null"
]
},
"anonymous": {
"description": "With `structure`: keep anonymous classes.",
"type": [
"boolean",
"null"
]
},
"lambdas": {
"description": "With `structure`: keep lambdas.",
"type": [
"boolean",
"null"
]
},
"inherited": {
"description": "Add the members each type inherits from supertypes in project files, with\n`inherited_from` and `path`.",
"type": [
"boolean",
"null"
]
}
}
}