get-schema
Retrieve a specific schema by its name from the StarTree MCP Server for Apache Pinot, enabling quick access to structured data configurations.
Instructions
Fetch a schema by name
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schemaName | Yes |
Implementation Reference
- mcp_pinot/server.py:164-171 (handler)MCP tool handler for 'get_schema': calls pinot_client.get_schema and returns JSON string or error.@mcp.tool def get_schema(schemaName: str) -> str: """Fetch a schema by name""" try: results = pinot_client.get_schema(schemaName=schemaName) return json.dumps(results, indent=2) except Exception as e: return f"Error: {str(e)}"
- mcp_pinot/pinot_client.py:443-453 (helper)PinotClient method that performs HTTP GET request to retrieve schema from Pinot controller.def get_schema(self, schemaName: str) -> dict[str, Any]: url = f"{self.config.controller_url}/{PinotEndpoints.SCHEMAS}/{schemaName}" headers = self._create_auth_headers() response = requests.get( url, headers=headers, timeout=(self.config.connection_timeout, self.config.request_timeout), verify=True, ) response.raise_for_status() return response.json()