Skip to main content
Glama

remediate_and_verify

Apply a code patch, re-scan to confirm the vulnerability is resolved, and automatically rollback if verification fails, ensuring no new high-severity issues are introduced.

Instructions

Apply a fix and prove it worked: scan → patch → re-scan → confirm gone.

The closed remediation loop. Recovers the finding by hash, dry-runs the patch, re-scans the affected file before and after applying it, and returns PASS only if the finding's hash disappears and no new finding of equal or higher severity is introduced. On failure (and when auto_rollback), the patch is reverted so the working tree is left clean.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
target_pathYesRoot of the scanned project (with a `.sast-mcp-cache`).
finding_hashYesHash of the finding to fix (from earlier scan output).
patchYesThe unified diff to apply (e.g. produced via generate_fix_prompt).
scanner_nameNoScanner to re-scan with. Defaults to the finding's originating scanner, falling back to all scanners.
auto_rollbackNoRevert the patch if verification fails (default True).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses the full process: scan, dry-run, re-scan before/after, PASS conditions, and auto-rollback behavior. The only omission is potential side effects like file locking, but it clearly states the working tree is left clean.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is ~100 words, front-loaded with the core action, and each sentence adds value. Efficient and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be detailed. The description covers the remediation loop fully, including failure handling. For a parameter-heavy tool, it is complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% (baseline 3). The description adds value by explaining the purpose of auto_rollback and noting that patch can be produced via generate_fix_prompt. It also clarifies scanner_name fallback behavior. A 4 is appropriate for the extra context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Apply a fix and prove it worked: scan → patch → re-scan → confirm gone.' This verb+resource summary distinguishes it from siblings like apply_patch by emphasizing the verification loop.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through 'The closed remediation loop' and details about recovery, dry-run, and re-scan. However, it does not explicitly contrast with siblings or state when not to use, so a slight deduction from perfect.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Skyrxin/sast-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server