Skip to main content
Glama

execute_rls_sql

Run SELECT queries impersonating Supabase user roles to test row-level security and verify data visibility.

Instructions

Run a SELECT query impersonating a user role (applies RLS). Useful to test what a role can see. Only available in supabase mode.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSQL SELECT query
roleYesSupabase role to impersonate
user_idNoUUID of the user to set in JWT context
paramsNo
Behavior3/5

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

The description correctly identifies the tool as running SELECT queries with RLS and role impersonation, but provides no details on side effects, error handling, or return behavior. Lacking annotations, the description carries the burden but covers only essential behavioral traits.

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 two sentences, front-loaded with the action and purpose, with no redundant information. Every sentence earns its place.

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?

For a 4-parameter tool with no output schema, the description is adequate but does not explain return format, error scenarios, or the implications of RLS. It remains minimal, which may be sufficient given the specialized context.

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 schema already describes 3 out of 4 parameters with good coverage (75%). The description adds context about impersonating a role, which aligns with the role parameter, but does not clarify the user_id or params fields beyond the schema.

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 tool runs a SELECT query with role impersonation and applies RLS, specifically for testing what a role can see. This is distinct from sibling tools like execute_sql, which likely run SQL without RLS.

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 mentions it is useful for testing what a role can see and is only available in supabase mode, implying its specific use case. However, it does not explicitly contrast with similar tools like execute_sql or state when not to use it.

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/natuleadan/mcp-backend'

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