Skip to content

suppress_inspection

MCP tools › Code insight and refactoring

Suppress one finding of Ferris IDEA's Java or Kotlin inspections, identified by file, 0-based line and column and inspection id from inspect_code. Java adds a //noinspection comment or @SuppressWarnings on the method or class; Kotlin adds @Suppress on the declaration or class, or @file:Suppress. Dry run unless dry_run false, which writes the file and refuses if it changed meanwhile.

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

Capabilitycode.suppress_inspection
AreaCode insight and refactoring
Accesschanges files
Reaches—
Rightswrite
Dry rundry_run, on unless the call turns it off

Arguments

ArgumentTypeDescription
pathrequiredstringWorkspace-relative Java or Kotlin file.
linerequiredinteger0-based line of the finding, as inspect_code returns it.minimum 0
columnrequiredinteger0-based column of the finding, as inspect_code returns it.minimum 0
idrequiredstringInspection id, e.g. java.string-equality or kotlin.unused-declaration.
scopestringstatement (default, a //noinspection comment), method or class (@SuppressWarnings), all (@SuppressWarnings("ALL") on the class: every inspection). Kotlin files: declaration (default, the same as statement), class or file (@Suppress, @file:Suppress).
dry_runbooleanOnly return the edits and the new text (default true).

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 suppress_inspection '{"path":"<string>","line":1,"column":1,"id":"<string>"}'
Input schema as JSON
{
"type": "object",
"required": [
"path",
"line",
"column",
"id"
],
"properties": {
"path": {
"description": "Workspace-relative Java or Kotlin file.",
"type": "string"
},
"line": {
"description": "0-based line of the finding, as `inspect_code` returns it.",
"type": "integer",
"minimum": 0
},
"column": {
"description": "0-based column of the finding, as `inspect_code` returns it.",
"type": "integer",
"minimum": 0
},
"id": {
"description": "Inspection id, e.g. `java.string-equality` or `kotlin.unused-declaration`.",
"type": "string"
},
"scope": {
"description": "`statement` (default, a `//noinspection` comment), `method` or `class` (`@SuppressWarnings`),\n`all` (`@SuppressWarnings(\"ALL\")` on the class: every inspection). Kotlin files:\n`declaration` (default, the same as `statement`), `class` or `file` (`@Suppress`,\n`@file:Suppress`).",
"type": [
"string",
"null"
],
"default": null
},
"dry_run": {
"description": "Only return the edits and the new text (default true).",
"type": [
"boolean",
"null"
]
}
}
}