Skip to main content
Glama

explain_rule

Explains a security finding and its remediation using the scanner's own report, returning the full check details and published fix so you know what the issue means and how to resolve it.

Instructions

Explain what a finding means and how to fix it, from the scan's own report. Returns the check in full and the remediation the scanner published. Prefer this over fetching a rule's help URI: the answer is already on disk, and for a benchmark that URI is often a registration form in front of a PDF.

Input Schema

NameRequiredDescriptionDefault
pathYespath to a results.sarif produced by draugr scan
ruleIdYesthe rule to explain, in full or by the part that is unambiguous: 4.3.1 finds kube-bench/cis/4.3.1

Output Schema

NameRequiredDescriptionDefault
noteNo
ruleIdYes
foundInNowhere this rule fired, capped
helpUriNo
descriptionNowhat the check is, in full rather than the truncated line a report shows
remediationNohow to fix it, as the scanner published it

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does well: it discloses that the answer comes from the scan report on disk, what is returned, and why the alternative help URI is often worse. It does not explicitly state read-only safety or error behavior, but the read-from-disk framing strongly implies a non-mutating operation.

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 three tightly written sentences. It front-loads the core purpose, then return behavior, then usage guidance, with no redundant or filler content.

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?

For a two-parameter tool with full schema coverage and an output schema, the description provides everything needed: what it does, what it returns, where the data comes from, and when to prefer it over the help URI alternative.

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 description coverage is 100%, and both parameters already have clear schema descriptions, including an example of partial ruleId matching. The tool description reinforces the report source but does not add new syntax or format details beyond the schema, so the baseline of 3 is appropriate.

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 uses the specific verb 'explain' with the resource 'rule/finding' and scopes it to the scan's own report. It also states that it returns the full check and scanner-published remediation, which clearly distinguishes it from sibling reporting and listing tools.

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

Usage Guidelines5/5

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

It explicitly says to prefer this tool over fetching a rule's help URI and explains why: the answer is already on disk and the URI may lead to a registration form or PDF. This gives a clear usage decision, not just implied context.

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