Skip to main content
Glama
startreedata

StarTree MCP Server for Apache Pinot

Official
by startreedata

get-table-config

Retrieve table configuration details from Apache Pinot by specifying the table name and type using the provided tool for StarTree MCP Server.

Instructions

Get table configuration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableNameYes
tableTypeNo

Implementation Reference

  • MCP tool handler for 'get_table_config'. Registered via @mcp.tool decorator. Executes by calling pinot_client.get_table_config and returns JSON-formatted result or error message.
    @mcp.tool def get_table_config(tableName: str, tableType: Optional[str] = None) -> str: """Get table configuration""" try: results = pinot_client.get_table_config( tableName=tableName, tableType=tableType, ) return json.dumps(results, indent=2) except Exception as e: return f"Error: {str(e)}"
  • Supporting method in PinotClient class that performs the actual HTTP request to retrieve table configuration from Pinot controller endpoint /tables/{tableName} with optional tableType query parameter.
    def get_table_config( self, tableName: str, tableType: str | None = None, ) -> dict[str, Any]: url = f"{self.config.controller_url}/{PinotEndpoints.TABLES}/{tableName}" params: dict[str, str] = {} if tableType: params["type"] = tableType headers = self._create_auth_headers() response = requests.get( url, headers=headers, params=params, timeout=(self.config.connection_timeout, self.config.request_timeout), verify=True, ) response.raise_for_status() raw_response = response.json() if tableType and tableType.upper() in raw_response: return raw_response[tableType.upper()] if not tableType and ("OFFLINE" in raw_response or "REALTIME" in raw_response): return raw_response return raw_response

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