Skip to content

context_actions

MCP tools › Code insight and refactoring

The ⌥↩ context actions at a caret position as the editor lists them: run (Run, Debug, Profile at a run-marker line with their configurations), own (Ferris IDEA's quick fixes, with fix-all options), actions (the language server's actions on the saved file, with options), hidden (intentions the user turned off) and server_error. Lines and characters 0-based. Read-only.

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

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

Arguments

ArgumentTypeDescription
pathrequiredstringWorkspace-relative file path.
linerequiredinteger0-based line of the caret.minimum 0
characterrequiredinteger0-based character of the caret (Unicode scalar values).minimum 0
titlestringTitle of the row (apply_context_action only).
optionstringLabel of an option of the row's submenu, e.g. Disable '<title>', Enable '<title>' (for a hidden intention) or Fix all '<name>' problems in file (apply_context_action only).
dry_runbooleanOnly report what would happen (default true; apply_context_action only).

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 context_actions '{"path":"<string>","line":1,"character":1}'
Input schema as JSON
{
"type": "object",
"required": [
"path",
"line",
"character"
],
"properties": {
"path": {
"description": "Workspace-relative file path.",
"type": "string"
},
"line": {
"description": "0-based line of the caret.",
"type": "integer",
"minimum": 0
},
"character": {
"description": "0-based character of the caret (Unicode scalar values).",
"type": "integer",
"minimum": 0
},
"title": {
"description": "Title of the row (`apply_context_action` only).",
"type": [
"string",
"null"
]
},
"option": {
"description": "Label of an option of the row's submenu, e.g. `Disable '<title>'`, `Enable '<title>'` (for\na hidden intention) or `Fix all '<name>' problems in file` (`apply_context_action` only).",
"type": [
"string",
"null"
]
},
"dry_run": {
"description": "Only report what would happen (default true; `apply_context_action` only).",
"type": [
"boolean",
"null"
]
}
}
}