Skip to main content
Glama
codedb-io

codeDB Lens

Official

explain_rule

Read-only

Explains a database health-check rule: what it measures, why it matters, the next action, how to verify a fix, required permissions, SQL, and documentation link.

Instructions

Explain one rule: what it measures, why it matters, the next action, how to verify the fix, the permission it needs, its SQL and its documentation link.

Input Schema

NameRequiredDescriptionDefault
rule_idYesrule ID, e.g. MSSQL-BACKUP-001 or PG-AUTOVAC-001

Output Schema

NameRequiredDescriptionDefault
idYes
sqlNo
kindNo
titleYes
caveatNo
engineYes
impactYes
verifyYes
doc_urlYes
categoryYes
severityYes
permissionYes
next_actionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so safety is covered and the description's job is lighter. The description usefully discloses the payload (measured metric, rationale, next action, verification, required permission, SQL, doc link), but says nothing about cost, latency, or failure behavior when the rule_id is unknown/invalid. Note the annotation pair readOnlyHint=true with idempotentHint=false is internally odd, though the description does not contradict it.

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?

One front-loaded sentence with a colon-delimited list of what the explanation returns; every item earns its place and there is no preamble. It is dense but tightly structured.

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 an output schema present, the description need not describe return values, yet it still previews the explanation's contents, which helps an agent decide whether to call it. Params are fully documented in schema and safety is covered by annotations, leaving only minor gaps like error behavior and a prerequisite pointer.

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% and the single rule_id parameter already carries an example format ('MSSQL-BACKUP-001 or PG-AUTOVAC-001'). The description adds nothing about the parameter, so baseline 3 applies.

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?

The description opens with a specific verb+resource ('Explain one rule') and enumerates exactly what the explanation covers, so an agent can tell it apart from list_rules or get_finding. It never explicitly names a sibling, so it stops short of a 5.

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 singular 'one rule' plus a required rule_id suggests a per-rule deep dive after list_rules has produced an ID. There is no explicit when-to-use statement, no stated prerequisite (e.g. obtain the ID from list_rules or get_finding), and no mention of alternatives such as check or get_finding.

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