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
| Name | Required | Description | Default |
|---|---|---|---|
| tableName | Yes | ||
| tableType | No |
Implementation Reference
- mcp_pinot/server.py:207-217 (handler)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)}"
- mcp_pinot/pinot_client.py:514-537 (helper)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