Loading...
Loading...
Execute database operations via Supabase MCP (query/write/migration/logs/type generation). Triggers: query/statistics/export/insert/update/delete/fix/backfill/migrate/logs/alerts/type generation. Does not trigger for: pure architecture discussion or code planning. Write operations require confirmation; UPDATE/DELETE without WHERE is refused.
npx skill4agent add heyvhuang/ship-faster mcp-supabaseworkflow-ship-fasterworkflow-ship-fasterworkflow-ship-fastersupabasesupabasesupabase/references/postgres-best-practices/AGENTS.mdsupabase/references/postgres-best-practices/rules/*.mdsupabase/references/postgres-best-practices/rules/query-missing-indexes.mdruns/<workflow>/active/<run_id>/01-input/goal.md01-input/context.json03-plans/sql.md05-final/result.mdlogs/events.jsonl| Tool | Parameters | Purpose |
|---|---|---|
| | List all tables in specified schema |
| | Execute SQL (query or DML) |
| | Apply database migration |
| | View existing migrations |
| | Generate TypeScript type definitions |
| | Get project URL |
| | Get public API keys |
| | Query service logs |
| | Get security/performance recommendations |
list_edge_functionsget_edge_functiondeploy_edge_functioncreate_branchlist_branchesmerge_branchreset_branchrebase_branchdelete_branchLIMIT 50SELECT count(*)apply_migrationexecute_sql1. Parse requirements → restate objective
2. Unsure about tables/fields → first list_tables or execute_sql to query information_schema
3. Plan SQL → present to user
4. Read-only → execute directly
5. Write operation → confirm before execution → verify affected rows → report result✅ Query complete: 142 new users in the last 7 days
Executed SQL:
SELECT DATE(created_at) as date, COUNT(*) as count
FROM user_profiles
WHERE created_at > NOW() - INTERVAL '7 days'
GROUP BY DATE(created_at) ORDER BY date DESC;
| date | count |
|------------|-------|
| 2025-01-09 | 23 |
| 2025-01-08 | 31 |
| ... | ... || Situation | Action |
|---|---|
| SQL syntax error | Return error summary + fix suggestions |
| Insufficient permissions | Explain required permissions + alternatives |
| No data returned | Explain possible reasons (conditions too strict? data doesn't exist?) |
| RLS blocked | Suggest checking RLS policy or using service_role |
User: Get registered user count for the last 7 days, by day
Execution:
1. Confirm table user_profiles, field created_at
2. Execute aggregation SQL
3. Return: conclusion + numbers + SQL + tableUser: Find projects that have runs but all failed
Execution:
1. Confirm projects, runs tables and status field
2. Present JOIN + aggregation SQL
3. Execute and return results (mask email)User: Create a new run for project xxx
Execution:
1. First check if project exists
2. Present INSERT SQL + expected impact: 1 row
3. Await confirmation → execute → return new record idUser: Change run abc's status to completed
Execution:
1. First SELECT to verify current state
2. Present UPDATE SQL + WHERE id = 'abc'
3. Confirm → execute → SELECT again to verifyUser: Delete all runs where status = 'failed'
Execution:
1. First SELECT count(*) WHERE status = 'failed'
2. Present count + DELETE SQL
3. If > 100 rows, force double confirmation
4. After confirmation execute → report deleted row countUser: Clear the runs table
Execution:
❌ Refuse to execute
→ Prompt: DELETE without WHERE condition, this will delete all data
→ Suggest: Use TRUNCATE (requires migration) or add explicit condition-- List all tables
SELECT table_name FROM information_schema.tables
WHERE table_schema = 'public';
-- View table structure
SELECT column_name, data_type, is_nullable
FROM information_schema.columns
WHERE table_name = '<table_name>';generate_typescript_types