Skip to main content
Glama
MIRAI Intelligence & Research MCP

MIRAI Intelligence & Research MCP

by Tarant336

Root-cause analysis (diff-based)

vulnerability_root_cause
Read-onlyIdempotent

Explains why a vulnerability exists by diffing vulnerable and patched source code or using a CVE advisory, then reports root cause, vulnerable pattern, and defensive fix guidance.

Instructions

Explain WHY a vulnerability exists. With sourcePath (and optional patchedPath) it locates the hinted function, line-diffs vulnerable vs patched code and classifies the fix (bounds/auth/validation/integer/null check). With only cveId it uses the stored advisory. Produces root cause, vulnerable function, vulnerable pattern, why it exists and defensive fix guidance.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "vulnerability_root_cause"
  }
}

Input Schema

NameRequiredDescriptionDefault
cveIdNoCVE id to pull the local advisory record.
sourcePathNoVulnerable source file (workspace-relative).
patchedPathNoPatched source file for diffing (workspace-relative).
functionHintNoFunction/identifier to focus on.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered; the description goes further by disclosing the internal mechanics (locating the hinted function, line-diffing the two files) and the fix-classification taxonomy (bounds/auth/validation/integer/null check). That is real behavioral context an agent could not get from the annotations. It does not mention failure modes, such as what happens when the advisory or patched file is absent.

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

Conciseness4/5

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

Three sentences, front-loaded with the purpose, then the two operating modes, then the produced outputs. Dense and mostly waste-free. The output list slightly overlaps ("root cause" and "why it exists" restate each other), but since no output schema exists the enumeration earns its place.

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

Completeness4/5

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

With no output schema, the description correctly enumerates the return contents (root cause, vulnerable function, pattern, rationale, defensive fix guidance). It covers both invocation modes and all four parameters. It is thin only on prerequisites and error behavior for the advisory-only path.

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

Parameters3/5

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

Schema coverage is 100%, so all four parameters are already documented in structured data, which sets the baseline at 3. The description does add relationship semantics the schema lacks: patchedPath is optional and only meaningful alongside sourcePath, functionHint drives function location, and cveId is the fallback trigger. That is marginal added value rather than deep parameter guidance.

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

Purpose4/5

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

States a specific verb and resource ("Explain WHY a vulnerability exists") and immediately splits into two concrete modes: line-diffing vulnerable vs patched source, or falling back to a stored advisory. An agent can tell this is root-cause analysis rather than raw scanning or verification. It stops short of naming the sibling root-cause tools (patch_root_cause_analyze, crash_root_cause_analyze), so the boundary between them is left to inference.

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?

Gives explicit condition-based routing: use diff mode when sourcePath (optionally with patchedPath) is supplied, use advisory mode when only cveId is supplied. That is actionable selection logic rather than a vague hint. There are no when-not-to-use statements or named alternatives for overlapping siblings, so it is not a 5.

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

Deploy Server

Other Tools