Skip to main content
Glama

Supabase: Execute sql

supabase_execute_sql
Destructive

Executes raw SQL queries against a Supabase site and returns results, bypassing row-level security for direct database access.

Instructions

[UNIFIED] Execute raw SQL query. Use with caution - bypasses RLS. Returns query results.

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": {
      "site": "<site>",
      "query": "<query>"
    },
    "name": "supabase_execute_sql"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteYes
queryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.14.0
  2. Removedv3.13.1
  3. First observedv3.4.0

TDQS

B3.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and idempotentHint=false, so the safety profile is partly covered. The description still adds real value beyond them by disclosing that the query bypasses Row Level Security — a consequence an agent cannot learn from annotations — and that results are returned, though it omits permission requirements and result-shape details.

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?

Three short, front-loaded sentences with the action first and the hazard immediately after; nothing is redundant. It is terse to the point of under-specification, but not padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is an arbitrary-SQL execution tool with destructive semantics, 0% parameter documentation, and no output schema. The definition says nothing about the result format, statement limits, transaction behavior, or what "site" identifies, so an agent lacks what it needs to call it confidently.

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

Parameters2/5

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

Schema description coverage is 0% for both required parameters. The description mentions nothing about them, leaving "site" (project ref? URL? region?) and "query" (dialect, single vs. multi-statement, parameter binding) entirely undefined in both schema and prose.

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?

"Execute raw SQL query" states a specific verb and resource, and the "[UNIFIED]" marker plus the raw-SQL framing separates it from the many single-purpose siblings like supabase_create_table or supabase_count_rows. It stops short of explicitly naming when the dedicated tools are preferable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Use with caution - bypasses RLS" is a hazard warning rather than usage guidance; it never says when to reach for this versus a scoped sibling such as supabase_execute_rpc or the CRUD/DDL tools. The agent must infer that choice from tool names alone.

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

Deploy Server

Other Tools