Skip to main content
Glama

get_findings

Audit Supabase/Postgres Row Level Security and return structured JSON findings grouped by severity, enabling agents to iterate findings, generate fixes, or build reports.

Instructions

Audit a Supabase/Postgres database's Row Level Security and return machine-readable structured JSON. Unlike audit_supabase_rls (which returns a human-readable summary), this tool returns findings grouped by severity with counts, suitable for programmatic consumption by an agent that needs to iterate over findings, generate fixes, or build a report. Same engine, same checks (tables, policies, Storage, SECURITY DEFINER functions, views, Realtime, default privileges, roles), different output shape. Each finding has kind, severity (fail/warn), object and detail; pass kind to explain_finding or generate_fix.

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": {
      "db_url": "<db_url>"
    },
    "name": "get_findings"
  }
}

Input Schema

NameRequiredDescriptionDefault
allowNoPolicy names that are intentionally permissive. Prefer the qualified form "table.policy".
db_urlYesPostgres connection string for the project to audit (e.g. postgresql://... — a read-only role is enough).
schemaNoSchema to audit (default: public).public

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden. It discloses output grouping by severity with counts and individual finding fields, but does not explicitly state that the audit is read-only, what permissions are required, or whether it has any side effects.

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?

The purpose is front-loaded and the description is generally efficient. The long parenthetical list of checks is useful but slightly dense, and a few phrases restate the output-shape distinction without adding much.

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?

There is no output schema, so the description appropriately explains the return shape: findings grouped by severity with counts, and each finding containing kind, severity, object, and detail. It is mostly complete for an audit tool, though safety and read-only behavior are left implicit.

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%, so the schema already documents db_url, schema, and allow. The description adds little parameter-specific meaning beyond referring to the output field kind for follow-up tools, so 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 and resource: audit Row Level Security on a Supabase/Postgres database and return structured JSON findings. It explicitly distinguishes this output shape from sibling audit_supabase_rls, which returns a human-readable summary.

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 names the alternative audit_supabase_rls and explains the selection criterion: programmatic consumption, iteration over findings, fix generation, or report building versus a human-readable summary. It also tells the agent to pass a finding's kind to explain_finding or generate_fix for follow-up.

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