Skip to main content
Glama
startreedata

StarTree MCP Server for Apache Pinot

Official
by startreedata

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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)}"
  • 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
  • The @mcp.tool decorator registers the list_tables function as an MCP tool, likely named 'list-tables'.
    @mcp.tool

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/startreedata/mcp-pinot'

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