On this page

Tools

Tools offered by the StitchDB MCP server. Read-only connections do not see tools that change anything.

#Projects

ToolWhat it does
list_projectsProjects the connection can access: reference, name, status, region, API URL.
get_projectStatus, region, usage, plan limits and the database host (never the password).
get_project_urlThe API URL of a project.
get_anon_keyThe public anon key. Secret keys are never returned.

#Database

ToolWhat it does
list_tablesTables and views with Row Level Security status, policy count, estimated rows, size and API exposure.
describe_tableColumns, keys, foreign keys, indexes, triggers and policies of a table.
list_extensionsAvailable and installed Postgres extensions.
list_policiesRow Level Security policies in public and storage.
execute_sqlRuns SQL as the project owner role: 15 second timeout, up to 1,000 rows. On read-only connections it runs one statement in a READ ONLY transaction.
apply_migrationRead-write only. Applies a named schema migration in one transaction and records it.
list_migrationsMigrations applied with apply_migration.
generate_typescript_typesA Database type for stitchdb-js from your tables, views, functions and enums.

#Operations

ToolWhat it does
get_logsLogs of API requests (api), Auth (auth), the REST server (rest), Postgres (postgres), Edge Functions (functions) or the SQL history (sql), with search, level and status filters, up to your plan's log retention.
query_logsCounts and statistics over the logs of up to 24 hours: SELECT status, count(*) AS n, p95(ms) FROM api WHERE status >= 500 GROUP BY status ORDER BY n DESC. Sources api, auth, rest, postgres, functions; filters, group by (also by minute/hour), count, sum, avg, min, max and p50–p99. Read-only; log lines are returned as data.
get_advisorsSecurity, performance and health findings (type: security, performance, health or all). Health: error rates above normal for REST, Auth, Storage and Functions, failed sign-ins, connection and pooler pressure. Security and performance, with SQL to fix them: tables without RLS, RLS without policies, views that bypass RLS, exposed sensitive columns, missing primary keys, unindexed foreign keys and functions with a mutable search_path.
list_connectionsSessions connected to the database (as Database › Connections in Studio): state, run times, lock waits and the sessions blocking them, long-running and idle-in-transaction flags, and your roles' connections against their limit. Platform services' SQL is hidden. Works on read-only connections; cancelling or closing a session is done in Studio.
list_storage_bucketsBuckets with visibility, limits, object count and size.

#Edge Functions

ToolWhat it does
list_edge_functionsFunctions with URL, version and whether a JWT is required.
get_edge_functionSource files and settings of the live (or a given) version.
deploy_edge_functionRead-write only. Creates a function or deploys a new version from source files. See Edge Functions.
get_edge_function_logsRecent console output, boot errors and limit stops.

#Provisioning and operating projects

For platforms and agents that create projects on the fly (see Platforms). Write tools need a read-write connection and, with an organization token, the matching scope.

ToolWhat it does
create_projectCreates a project (optional labels, ttl_seconds for automatic deletion, template_sql and seed_sql). Returns at once; poll get_project until it is active.
pause_project, restore_projectPause (data kept, API answers 503) and restore.
set_project_limitsPer-project caps below the plan (size, requests per second, end users, functions, …).
rotate_api_keysNew anon and service_role keys, old ones refused after a grace period.
get_usage, get_organization_usageDaily usage of a project / of every project of the organization.
list_webhooksThe organization’s webhook endpoints.
ToolWhat it does
search_docsSearches this documentation.
search, fetchSearch docs and your tables, then fetch one result (the pair ChatGPT uses for connectors and deep research).

Every tool carries readOnlyHint / destructiveHint annotations, so clients can ask before running anything that changes data.