Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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")
  • ToolName enum definition registering 'get_schemas' as a known tool.
    GET_SCHEMAS = "get_schemas"

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/alexander-zuev/supabase-mcp-server'

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