Skip to main content
Glama

Explain a rule by id

explain_rule
Read-only

Retrieve a security rule's title, severity, impact, and remediation steps by providing its rule ID to understand findings before or after a scan.

Instructions

Given a ruleId, returns the rule's title, class, severity, why-it-matters, and remediation pattern. Use before or after a scan to understand a rule without an active finding.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ruleIdYesThe rule id, e.g. 'supabase-service-role'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

The readOnlyHint annotation already declares this is a read-only operation, so the description doesn't need to state that. The description adds context by noting that it works 'without an active finding', which is a behavioral trait beyond the annotation. However, it doesn't discuss error conditions (e.g., invalid ruleId) or response details beyond listing fields, so it falls short of richer behavioral disclosure.

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?

Two concise sentences with no filler. The first sentence front-loads the purpose and output; the second gives usage timing. Every word earns its place, and the structure is optimally scannable.

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?

Given a single parameter, no output schema, and readOnlyHint annotations, the description covers the essential behavior (what it returns, when to use it). It doesn't mention error handling for invalid ruleIds, but that's a minor gap for such a simple tool. The listed output fields are explicit, making it self-contained enough for an agent to call correctly.

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?

The schema description for ruleId already provides an example and type. The description mentions ruleId in context and clarifies its purpose (to identify a rule), but adds no new semantic detail beyond what the schema offers. With 100% schema coverage, the baseline of 3 applies.

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 states a specific verb ('returns'), a resource ('rule'), and enumerates the exact fields returned (title, class, severity, why-it-matters, remediation pattern). It distinguishes itself from siblings by clarifying that it works 'without an active finding', setting it apart from explain_finding which presumably requires a finding. This is unambiguous and clearly scoped.

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 explicitly says 'Use before or after a scan to understand a rule without an active finding.' This gives clear timing context and implies that if you have an active finding, you should use explain_finding instead, though it doesn't name the sibling explicitly. It provides solid usage guidance without full exclusion criteria.

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