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
diagnosticIdstring✓Diagnostic ID (e.g., 'CA1822', 'CS0168')
filePathstring✓Full path to the source file
lineint✓Line number where the diagnostic occurs
limitint?Maximum number of items to return (default: 100). Items are sorted by title.