Skip to main content
Glama
MIRAI Intelligence & Research MCP

MIRAI Intelligence & Research MCP

by Tarant336

Analyze a patch for root cause

patch_root_cause_analyze
Read-onlyIdempotent

Compare vulnerable and patched source files to infer vulnerability root cause from changed dangerous constructs and assess whether the fix is effective.

Instructions

Compare a vulnerable source file against a patched version and infer the root cause from the dangerous constructs that changed. Also emits a fix-effectiveness assessment. Line-based, heuristic.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "vulnerableFilePath": "<vulnerableFilePath>",
      "patchedFilePath": "<patchedFilePath>"
    },
    "name": "patch_root_cause_analyze"
  }
}

Input Schema

NameRequiredDescriptionDefault
maxBytesNoMaximum bytes to read from the artifact.
patchedFilePathYes
vulnerableFilePathYesPath to the artifact, relative to the authorized workspace root.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already cover the safety profile (read-only, idempotent, non-destructive, closed-world), and the description adds genuinely new context: the analysis is line-based and heuristic, warning the agent that results are approximate, and it discloses a secondary fix-effectiveness output. It does not mention how large inputs are handled or any limits, but the heuristic disclaimer is material information beyond the annotations.

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?

Two sentences, front-loaded with the core comparison and inference action, with the auxiliary output and heuristic caveat trailing. The fragment 'Line-based, heuristic.' is terse but earns its place as a limitation note.

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

Completeness3/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 is the only source of return-value information, and it only says a fix-effectiveness assessment is emitted without any indication of result structure or findings format. For a 3-parameter analysis tool with partial schema coverage, the definition is adequate but leaves the agent guessing about the response.

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?

At 67% schema coverage the baseline is 3, and the description ties the two required paths to source files specifically, which sharpens the schema's generic 'artifact' wording. The maxBytes parameter is never explained in the description and its schema text is vague about truncation behavior, so no real compensation exists for that gap.

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?

Uses a specific verb-plus-resource pairing: compare a vulnerable source file against a patched version and infer root cause from changed dangerous constructs. This clearly separates it from generic diff tools, though it never names the closest siblings (patch_diff_analyze, vulnerability_root_cause) to draw the boundary explicitly.

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

Usage Guidelines3/5

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

Usage is only implied: the agent can infer it needs both a vulnerable and a patched file path. There is no statement of when to prefer this over patch_diff_analyze or vulnerability_root_cause, and no prerequisites or exclusions are given.

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