Skip to main content
Glama
startreedata

StarTree MCP Server for Apache Pinot

Official
by startreedata

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
NameRequiredDescriptionDefault
schemaNameYes

Implementation Reference

  • 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)}"
  • 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()

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