Skip to main content
Glama
HenkDz

Self-Hosted Supabase MCP Server

by HenkDz

execute_sql

Execute SQL queries directly on your self-hosted Supabase database for data retrieval, updates, and management operations.

Instructions

Executes an arbitrary SQL query against the database, using direct database connection when available or RPC function as fallback.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesThe SQL query to execute.
read_onlyNoHint for the RPC function whether the query is read-only (best effort).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the execution method (direct connection or RPC fallback) but lacks critical details such as whether this tool can perform destructive operations, what permissions are required, how results are returned, or any rate limits. For a tool that executes arbitrary SQL with no safety annotations, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that efficiently conveys the core purpose and implementation details without unnecessary words. It's front-loaded with the main action and avoids redundancy, making it easy to parse quickly.

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?

Given the complexity of executing arbitrary SQL (which can include reads, writes, or schema changes), the lack of annotations, and no output schema, the description is insufficient. It doesn't address safety, permissions, result formats, or error handling, leaving critical gaps for an AI agent to use this tool effectively in varied contexts.

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 both parameters (sql and read_only) with clear descriptions. The description doesn't add any meaningful semantic information beyond what's in the schema, such as SQL dialect specifics or read_only implications. Baseline 3 is appropriate when the schema handles parameter documentation adequately.

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 clearly states the specific action ('Executes an arbitrary SQL query') and the target resource ('against the database'), with additional implementation details about connection methods. It distinguishes itself from sibling tools like list_tables or get_database_stats by focusing on direct SQL execution rather than predefined operations.

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?

The description implies usage context by mentioning 'direct database connection when available or RPC function as fallback,' suggesting this is a general-purpose SQL execution tool. However, it doesn't explicitly state when to use this versus alternatives like apply_migration for schema changes or list_tables for metadata queries, nor does it provide exclusions or prerequisites.

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