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.
| Capability | code.context_actions |
|---|---|
| Area | Code insight and refactoring |
| Access | reads only |
| Reaches | process |
| Rights | none |
| Dry run | none |
Arguments
| Argument | Type | Description |
|---|---|---|
pathrequired | string | Workspace-relative file path. |
linerequired | integer | 0-based line of the caret.minimum 0 |
characterrequired | integer | 0-based character of the caret (Unicode scalar values).minimum 0 |
title | string | Title of the row (apply_context_action only). |
option | string | Label 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_run | boolean | Only 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.
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" ] } }}