Skip to main content
Glama

check_db_policies

Analyze SQL migrations and Firebase rules to detect missing row-level security, permissive policies, and open Firestore access before deployment.

Instructions

Preflight check #1 (static): analyse SQL migrations and Firebase rules in a project directory — tables created without ENABLE ROW LEVEL SECURITY, policies with USING(true)/WITH CHECK(true), Firestore rules with 'allow ...: if true'. Returns an empty findings list with an explanatory summary when no DB artifacts exist.

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": {
      "target": "<target>"
    },
    "name": "check_db_policies"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetYesAbsolute or relative path to the project directory

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden, and it does disclose the analysis mode (static), the exact rule patterns detected, and the edge-case return of an empty findings list plus an explanatory summary when no DB artifacts exist. It still omits whether the tool only reads files, what happens on unreadable or malformed migrations, and the shape of individual findings.

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 sentence, front-loaded with the preflight role and static qualifier, then the concrete checks, then the empty-result behavior. Dense but every clause carries information; only the parenthetical numbering feels like scaffolding.

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 covers both the populated case (a findings list) and the empty case (empty list with explanatory summary), and the input is fully documented by the schema. What remains missing is minor detail on finding contents and failure modes for a read-only static scan.

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 single parameter has 100% schema description coverage, so the schema already defines 'target' as the project directory path. The description's phrase 'in a project directory' is consistent with the schema but adds no new syntax or constraint detail, so the high-coverage baseline of 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?

States a specific verb (analyse) and concrete resources (SQL migrations, Firebase rules) and enumerates the exact defect classes it looks for, so the agent knows precisely what the tool inspects. The '(static)' qualifier and 'Preflight check #1' hint at a different mode from the sibling probe_exposure, but no sibling is named explicitly.

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?

'Preflight check #1 (static)' implies this runs early in a review sequence and before dynamic checks, which gives usable positioning context. However, it never states when to skip it, what precedes or follows it, or why one would choose it over probe_exposure or scan_red_flags.

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