Skip to main content
Glama
canbolayir

Supabase MCP Server

by canbolayir

sql_aggregate_enhanced

Run aggregate functions (count, sum, avg, min, max) on any Supabase table using raw SQL, bypassing client limitations. Supports filters and grouping.

Instructions

Execute aggregate functions using raw SQL (bypasses Supabase client limitations)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYesTable name to aggregate
columnNoColumn to aggregate (not needed for count)
filtersNoWHERE clause filters (key-value pairs)
functionYesAggregate function (count, sum, avg, min, max)
group_byNoColumn to group by (optional)
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It mentions 'raw SQL' but does not clarify whether this is a safe read-only operation, what permissions are required, or what the return format looks like. The lack of detail on potential side effects or execution behavior 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, concise sentence that immediately states the core purpose. It avoids unnecessary details and earns its place without waste, making it well-structured and front-loaded.

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

Completeness3/5

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

While the schema is fully described, the tool has no output schema and the description does not explain return values, especially for grouped aggregations. The 'bypasses limitations' context is useful, but the overall description is minimal and could benefit from a note about output shape or limitations.

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 input schema covers all parameters with descriptions, so the description does not need to add much. It does not provide additional meaning beyond the schema, such as usage examples or constraints. The baseline of 3 applies because schema coverage is 100%.

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?

The description clearly states the tool's function: executing aggregate functions via raw SQL. It also hints at differentiators from Supabase client limitations, but does not explicitly name alternative sibling tools like sql_aggregate. This is specific enough but lacks the explicit sibling differentiation seen in top-tier examples.

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 phrase 'bypasses Supabase client limitations' implies when to use this tool, but it does not explicitly state when not to use it or suggest alternatives. There is no mention of prerequisites or comparisons to other tools, so guidance is implied rather than explicit.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/canbolayir/self-hosted-supabase-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server