get_function_definition
Gets the source definition of a function
How to use it
get_function_definition is exposed by the Selfhosted Supabase MCP MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the get_function_definition tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install Selfhosted Supabase MCP
npx -y @smithery/cli install @HenkDz/selfhosted-supabase-mcp --client claudeOther tools in Selfhosted Supabase MCP (39)
Applies a SQL migration and records it in supabasemigrations.schemamigrations
Creates a new user in auth.users (password bcrypt-hashed via pgcrypto)
Deletes a user from auth.users
Executes an arbitrary SQL query
Runs EXPLAIN ANALYZE on a query
Generates TypeScript types from the database schema
Retrieves security and performance advisory notices
Retrieves details for a specific user
Shows recent execution history for a cron job
Shows active connections (pgstatactivity)
Retrieves database statistics (pgstat)
Shows index usage statistics
Retrieves recent log entries (analytics stack or CSV fallback)
Returns the configured Supabase URL
Shows RLS enabled/disabled status for tables
Retrieves storage bucket configuration
Gets the source definition of a trigger
Shows pgvector index statistics
Lists users from auth.users
Lists all available (installable) extensions
Lists constraints for a specific table
Lists scheduled jobs (requires pgcron extension)
Lists user-defined database functions
Lists installed PostgreSQL extensions
Lists foreign keys for a specific table
Lists indexes for a specific table
Lists applied migrations from supabasemigrations.schemamigrations
Lists PostgreSQL publications (e.g. supabaserealtime)
Lists Row-Level Security policies for a table
Lists all storage buckets
Lists objects within a specific bucket
Lists columns for a specific table
Lists tables in the database schemas
Lists triggers for a specific table
Lists pgvector indexes (requires pgvector extension)
Restarts the pgnet worker (if used)
Updates user details (password bcrypt-hashed if changed)
Updates storage bucket settings
Checks if the JWT secret is configured