roslyn:get_code_actions_at_position
List all available code fixes and refactorings at a specific position in a source file. Use zero-based coordinates, then apply any action by its title.
Instructions
Get ALL available code actions (fixes + refactorings) at a position. This is the master tool that exposes 100+ Roslyn refactorings.
USAGE: get_code_actions_at_position(filePath, line, column) or with selection: add endLine, endColumn OUTPUT: List of actions with title, kind (fix/refactoring), equivalenceKey WORKFLOW: (1) Call this to see available actions, (2) Use apply_code_action_by_title to apply one IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filePath": "<filePath>",
"line": "<line>",
"column": "<column>"
},
"name": "roslyn:get_code_actions_at_position"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | Zero-based line number | |
| column | Yes | Zero-based column number | |
| endLine | No | Optional: end line for selection | |
| filePath | Yes | Absolute path to source file | |
| endColumn | No | Optional: end column for selection | |
| includeCodeFixes | No | Include fixes for diagnostics (default: true) | |
| includeRefactorings | No | Include refactorings (default: true) |