Skip to main content
Glama

explain_finding

Retrieve the meaning, risk, fix steps with example SQL, and related findings for an Airlock finding kind from an audit result.

Instructions

Explain what an Airlock finding kind means, why it is dangerous, how to fix it (with example SQL), and which other findings are related. Pure lookup — no database connection needed. Use this after get_findings or audit_supabase_rls to understand a specific finding before fixing it. Supported kinds: rls_disabled, permissive_true, anon_unscoped, authenticated_unscoped, write_unchecked, write_unscoped, update_using_unscoped, delete_unscoped, or_branch_unscoped, helper_scoped, policy_trusts_user_metadata, security_definer, anon_executes_definer, definer_search_path_mutable, view_bypasses_rls, matview_exposed, public_bucket, realtime_exposure, default_privileges_to_api_roles, bypassrls_role, owner_bypasses_rls, cross_tenant_read_leak, cross_tenant_write_leak, cross_tenant_delete_leak, service_role_exposed, env_file_exposed, git_exposed, source_map_exposed, scan_truncated, plus any storage_ variant.

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": {
      "finding_kind": "<finding_kind>"
    },
    "name": "explain_finding"
  }
}

Input Schema

NameRequiredDescriptionDefault
finding_kindYesThe finding kind string from an audit result (e.g. 'rls_disabled', 'permissive_true', 'cross_tenant_read_leak').

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well on the most important trait: 'Pure lookup — no database connection needed' tells the agent this is a side-effect-free, offline-safe call. The exhaustive supported-kinds list further prevents failed calls, but it never states what happens for an unrecognized kind (error vs. generic fallback), leaving one behavioral gap.

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?

Purpose, behavioral note, and usage guidance are front-loaded in the first two sentences, and every clause is functional. The trailing kind list is long and dominates the description's length, but it is not filler — it substitutes for the missing enum — though it would be better placed in the schema's enum field.

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?

No output schema exists, yet the description still specifies the return payload (meaning, danger, remediation with example SQL, related findings), which is exactly what an agent needs to decide whether to call it. For a single-required-parameter lookup tool this is nearly complete; only error behavior for unsupported kinds is unaddressed.

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

Parameters5/5

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

Schema coverage is 100% and the parameter is already documented, but the description adds real meaning the schema lacks: the schema only gives three examples and no enum, while the description enumerates all ~30 valid kind values including the storage_<kind> pattern. That converts an unconstrained string into a constrained vocabulary the agent can validate against before calling.

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?

Specific verb ('Explain') plus specific resource ('an Airlock finding kind') with an enumerated content contract: meaning, danger, fix with example SQL, and related findings. It is clearly distinguishable from get_findings (which retrieves findings) and generate_fix (which produces a fix), so an agent can select it without opening the schema.

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 sequencing: 'Use this after get_findings or audit_supabase_rls ... before fixing it,' which names two concrete upstream siblings and implies generate_fix as the downstream step. It stops short of an explicit when-not-to-use statement (e.g., 'do not call for a whole scan, call get_findings'), which keeps it from a 5.

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