Skip to main content
Glama
startreedata

StarTree MCP Server for Apache Pinot

Official
by startreedata

update-schema

Modify and update an existing schema in Apache Pinot using JSON input, with options to reload or force changes as needed.

Instructions

Update an existing schema

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNo
reloadNo
schemaJsonYes
schemaNameYes

Implementation Reference

  • The primary MCP tool handler for 'update_schema'. Decorated with @mcp.tool for automatic registration. Calls PinotClient.update_schema and returns formatted JSON response or error.
    @mcp.tool def update_schema( schemaName: str, schemaJson: str, reload: bool = False, force: bool = False ) -> str: """Update an existing schema""" try: results = pinot_client.update_schema( schemaName, schemaJson, reload, force, ) return json.dumps(results, indent=2) except Exception as e: return f"Error: {str(e)}"
  • Helper method in PinotClient class that performs the actual HTTP PUT request to update the schema on the Pinot controller.
    def update_schema( self, schemaName: str, schemaJson: str, reload: bool = False, force: bool = False, ) -> dict[str, Any]: url = f"{self.config.controller_url}/{PinotEndpoints.SCHEMAS}/{schemaName}" params = {"reload": str(reload).lower(), "force": str(force).lower()} headers = self._create_auth_headers() headers["Content-Type"] = "application/json" response = requests.put( url, headers=headers, params=params, data=schemaJson, timeout=(self.config.connection_timeout, self.config.request_timeout), verify=True, ) response.raise_for_status() try: return response.json() except requests.exceptions.JSONDecodeError: return { "status": "success", "message": "Schema update request processed.", "response_body": response.text, }

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