Skip to main content

get_code_actions

List available code actions (refactorings and fixes) at a position in a C# file. Optionally specify endLine/endColumn to select a range for extract-method style refactorings. Returns action titles that can be passed to apply_code_action. Returns an envelope with items sorted by kind then title, totalCount, truncated, and limit (default 100).

Parameters

ParameterTypeRequiredDescription
filePathstringFull path to the C# source file
lineintLine number (1-based)
columnintColumn number (1-based)
endLineint?End line for text selection (1-based, optional)
endColumnint?End column for text selection (1-based, optional)
limitint?Maximum number of items to return (default: 100). Items are sorted by kind then title.