Skip to main content
Glama
startreedata

StarTree MCP Server for Apache Pinot

Official
by startreedata

table-details

Retrieve table size metrics to monitor and optimize data storage in StarTree MCP Server for Apache Pinot by specifying the table name.

Instructions

Get table size details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableNameYesTable name

Implementation Reference

  • MCP tool handler function 'table_details' that executes the tool logic by calling PinotClient.get_table_detail and returning JSON.
    @mcp.tool def table_details(tableName: str) -> str: """Get table size details""" try: results = pinot_client.get_table_detail(tableName=tableName) return json.dumps(results, indent=2) except Exception as e: return f"Error: {str(e)}"
  • Helper method in PinotClient that implements the core logic for fetching table size/details via HTTP GET to the Pinot controller's /tables/{tableName}/size endpoint.
    def get_table_detail( self, tableName: str, params: dict[str, Any] | None = None, ) -> dict[str, Any]: endpoint = PinotEndpoints.TABLE_SIZE.format(tableName) url = f"{self.config.controller_url}/{endpoint}" logger.debug(f"Fetching table details for {tableName} from: {url}") response = self.http_request(url) return response.json()
  • Registration of the 'table_details' tool using the @mcp.tool decorator.
    @mcp.tool def table_details(tableName: str) -> str:
  • Definition of API endpoints, including TABLE_SIZE used for table-details.
    class PinotEndpoints: QUERY_SQL = "query/sql" TABLES = "tables" SCHEMAS = "schemas" TABLE_SIZE = "tables/{}/size" SEGMENTS = "segments/{}"

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