Skip to main content

get_code_fixes

Get available code fixes for a specific diagnostic at a file location. Returns structured text edits that can be reviewed and applied. Returns an envelope with items sorted by title, totalCount, truncated, and limit (default 100).

Parameters

ParameterTypeRequiredDescription
diagnosticIdstringDiagnostic ID (e.g., 'CA1822', 'CS0168')
filePathstringFull path to the source file
lineintLine number where the diagnostic occurs
limitint?Maximum number of items to return (default: 100). Items are sorted by title.