list-tables
Retrieve and display all tables within Apache Pinot using the StarTree MCP Server. Simplify table management and data access directly from the server.
Instructions
List all tables in Pinot
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- mcp_pinot/server.py:70-78 (handler)MCP tool handler function for list-tables tool. Registers the tool and implements the core logic by calling pinot_client.get_tables() and serializing the result to JSON.@mcp.tool def list_tables() -> str: """List all tables in Pinot""" try: results = pinot_client.get_tables() return json.dumps(results, indent=2) except Exception as e: return f"Error: {str(e)}"
- mcp_pinot/pinot_client.py:310-317 (helper)Helper method in PinotClient that makes an HTTP GET request to the Pinot controller's /tables endpoint to retrieve and return the list of all tables.def get_tables(self, params: dict[str, Any] | None = None) -> list[str]: url = f"{self.config.controller_url}/{PinotEndpoints.TABLES}" logger.debug(f"Fetching tables from: {url}") response = self.http_request(url) tables = response.json()["tables"] logger.debug(f"Successfully fetched {len(tables)} tables") return tables
- mcp_pinot/server.py:70-70 (registration)The @mcp.tool decorator registers the list_tables function as an MCP tool, likely named 'list-tables'.@mcp.tool