get_schemas
Retrieve and list all database schemas, including their sizes and table counts, for Supabase PostgreSQL databases using the MCP protocol. Simplify database management with organized schema insights.
Instructions
List all database schemas with their sizes and table counts.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- supabase_mcp/tools/registry.py:25-29 (handler)MCP tool handler registration and entrypoint for 'get_schemas'. Delegates to feature_manager.execute_tool.@mcp.tool(description=tool_manager.get_description(ToolName.GET_SCHEMAS)) # type: ignore async def get_schemas() -> QueryResult: """List all database schemas with their sizes and table counts.""" return await feature_manager.execute_tool(ToolName.GET_SCHEMAS, services_container=services_container)
- Core execution logic for get_schemas: retrieves the SQL query from query_manager and executes it using handle_query.async def get_schemas(self, container: "ServicesContainer") -> QueryResult: """List all database schemas with their sizes and table counts.""" query_manager = container.query_manager query = query_manager.get_schemas_query() return await query_manager.handle_query(query)
- Helper method that provides the SQL query string for listing schemas by calling SQLLoader.get_schemas_query().def get_schemas_query(self) -> str: """Get a query to list all schemas.""" return self.sql_loader.get_schemas_query()
- Loads the predefined SQL query for get_schemas from the file 'queries/get_schemas.sql'.def get_schemas_query(cls) -> str: """Get a query to list all schemas.""" return cls.load_sql("get_schemas")
- supabase_mcp/tools/manager.py:15-15 (registration)ToolName enum definition registering 'get_schemas' as a known tool.GET_SCHEMAS = "get_schemas"