save_recommendation
Accept or reject a code recommendation from a previous suggest_code scan.
Accepting a recommendation marks the corresponding category rules as passed, updating the scan's category scores in the dashboard. Rejecting only logs the decision without changing scores.
Args: scan_uuid: The scan UUID returned by suggest_code in tag. accepted: True to accept the recommendation, False to reject it. filename: Relative file path the recommendation applies to. before_code: The original code block (from the 'Before' section). after_code: The recommended replacement code (from the 'After' section). project_name: Project name (same as used in suggest_code). categories: List of category keys this recommendation belongs to (e.g. ["security", "logging"]). Used to update scores. title: Short title of the recommendation. severity: Severity level (critical / high / medium / low).
Returns: Confirmation message with the result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | ||
| accepted | Yes | ||
| filename | Yes | ||
| severity | No | ||
| scan_uuid | Yes | ||
| after_code | Yes | ||
| categories | No | ||
| before_code | Yes | ||
| project_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |