generate_fix_prompt
Generates a structured prompt for an LLM to produce a unified diff patch to fix a cached security finding, using expanded source context for accurate remediation.
Instructions
Build an LLM-ready prompt to fix a cached finding as a unified diff.
Recovers the finding (by hash) from the scan cache, extracts an expanded
window of the vulnerable source, and returns a prompt engineered to make
an LLM emit a strict unified diff. After generating the patch, apply it
with apply_patch.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target_path | Yes | Root of the scanned project (must have a `.sast-mcp-cache`). | |
| finding_hash | Yes | Hash of the finding to remediate (shown in scan output). | |
| context_window | No | Source lines to include before/after the finding. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |