Generate a dead-code removal patch
generate_fixBuild a unified-diff patch that removes or comments out dead code found by static analysis, after grep verification. Preview changes by default or apply them when validation succeeds.
Instructions
Build a unified-diff patch that removes (or comments out) dead code found by static analysis, after grep verification drops findings that are still referenced.
Returns the diff, patch summary, validation errors and applied status. With apply=False (default) it previews changes; with apply=True it edits files if patch validation succeeds. Refuses to run when the analysis or grep verification was incomplete. Review the diff and run trusted tests before keeping it.
Requires SKYLOS_API_KEY: this tool returns an authentication error unless the MCP server is started with SKYLOS_API_KEY set. Without a key only analyze works (5 calls/day). The local CLI needs no key: skylos verify <file> and skylos agent install-hooks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | "delete" removes dead code; "comment" comments it out instead. | delete |
| path | Yes | Directory or file to scan. A relative path resolves against the MCP server's working directory. | |
| apply | No | False (default) previews the unified diff. True also writes changes when patch validation succeeds. | |
| min_safety | No | Skip findings whose safety score (0.0-1.0; imports score highest, methods lowest) is below this value. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |