Skip to main content
Glama
abushadab

Self-Hosted Supabase MCP Server

by abushadab

list_extensions

Retrieve a detailed list of all PostgreSQL extensions installed in your database using the Self-Hosted Supabase MCP Server, enabling efficient database management and feature inspection.

Instructions

Lists all installed PostgreSQL extensions in the database.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The execute function implementing the tool logic: queries pg_extension table for installed extensions (excluding plpgsql), using utilities for SQL execution and response handling.
    execute: async (input: ListExtensionsInput, context: ToolContext) => {
        const client = context.selfhostedClient;
    
        // SQL based on pg_extension
        const listExtensionsSql = `
            SELECT
                pe.extname AS name,
                pn.nspname AS schema,
                pe.extversion AS version,
                pd.description
            FROM
                pg_catalog.pg_extension pe
            LEFT JOIN
                pg_catalog.pg_namespace pn ON pn.oid = pe.extnamespace
            LEFT JOIN
                pg_catalog.pg_description pd ON pd.objoid = pe.oid AND pd.classoid = 'pg_catalog.pg_extension'::regclass
            WHERE
                pe.extname != 'plpgsql' -- Exclude the default plpgsql extension
            ORDER BY
                pe.extname
        `;
    
        const result = await executeSqlWithFallback(client, listExtensionsSql, true);
    
        return handleSqlResponse(result, ListExtensionsOutputSchema);
    },
  • Zod schemas defining input (empty), output (array of {name, schema, version, description}), and MCP JSON input schema for the list_extensions tool.
    const ListExtensionsOutputSchema = z.array(z.object({
        name: z.string(),
        schema: z.string(),
        version: z.string(),
        description: z.string().nullable().optional(),
    }));
    
    // Input schema (none needed for this tool)
    const ListExtensionsInputSchema = z.object({});
    type ListExtensionsInput = z.infer<typeof ListExtensionsInputSchema>;
    // Static JSON Schema for MCP capabilities
    const mcpInputSchema = {
        type: 'object', 
        properties: {},
        required: [],
    };
  • src/index.ts:101-101 (registration)
    Registers the listExtensionsTool in the availableTools map used by the MCP server.
    [listExtensionsTool.name]: listExtensionsTool as AppTool,
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states what the tool does but doesn't disclose behavioral traits like whether it requires specific permissions, returns a paginated list, includes system extensions, shows version information, or has any rate limits. The description is minimal and lacks operational context.

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, efficient sentence that directly states the tool's function with zero wasted words. It's appropriately sized and front-loaded, making it easy to understand immediately.

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?

Given the tool's simplicity (0 parameters, no output schema), the description is adequate but minimal. It explains what the tool does but lacks context about return format, permissions needed, or relationship to other database listing tools. For a read-only listing tool with no annotations, more behavioral detail would be helpful.

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

Parameters4/5

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

The tool has 0 parameters, and schema description coverage is 100%. With no parameters to document, the description appropriately doesn't discuss any. It focuses on the tool's purpose rather than parameter details, which is correct for a parameterless tool.

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 ('Lists') and resource ('all installed PostgreSQL extensions in the database'). It distinguishes from siblings like list_tables, list_auth_users, and list_migrations by specifying the exact type of database objects being listed.

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 (when you need to see installed extensions) but provides no explicit guidance on when to use this versus alternatives like execute_sql for custom queries or list_tables for different database objects. No exclusions or prerequisites are mentioned.

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

Related 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/abushadab/selfhosted-supabase-mcp-basic-auth'

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