Skip to content

inspect_code

MCP tools › Code insight and refactoring

Run Ferris IDEA's own code inspections (as Code | Inspect Code) over the project or a file or folder: Java checks (unused code, redundant casts, null dereferences, string ==, …), Kotlin empty catch, Python bare except, JS/TS coercing ==, merge markers, .properties problems, and repeated words, a/an and typos in text. The inspection profile and //noinspection/@SuppressWarnings apply. Project-wide runs skip non-project files (summarised in not_inspected). Returns findings with path, 0-based line and column, inspection id, level, message and quick-fix title (apply with fix_inspection).

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

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

Arguments

ArgumentTypeDescription
pathstringWorkspace-relative file or folder to inspect; the whole project when omitted.
idstringRun only this inspection (e.g. java.unused-declaration), even when the profile turns it off (SPEC-0098 v4).

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 inspect_code
Input schema as JSON
{
"type": "object",
"properties": {
"path": {
"description": "Workspace-relative file or folder to inspect; the whole project when omitted.",
"type": [
"string",
"null"
],
"default": null
},
"id": {
"description": "Run only this inspection (e.g. `java.unused-declaration`), even when the profile turns it\noff (SPEC-0098 v4).",
"type": [
"string",
"null"
],
"default": null
}
}
}