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,
            }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Update') but doesn't reveal critical traits: whether this is a safe or destructive operation, permission requirements, side effects (e.g., impact on existing data), rate limits, or error handling. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It's front-loaded with the core action and resource, making it immediately understandable at a basic level. Every word earns its place, though this conciseness comes at the cost of completeness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (mutation operation with 4 parameters), lack of annotations, 0% schema coverage, and no output schema, the description is severely incomplete. It doesn't address behavioral risks, parameter meanings, return values, or differentiation from siblings. For a schema-update tool in this context, the description provides inadequate guidance.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It mentions no parameters at all, failing to explain the meaning of 'schemaName', 'schemaJson', 'force', or 'reload'. The description adds zero value beyond what the bare schema provides, leaving all four parameters semantically opaque to the agent.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Update an existing schema' clearly states the verb ('Update') and resource ('existing schema'), making the basic purpose understandable. However, it doesn't distinguish this tool from its sibling 'update-table-config' or other schema-related tools, leaving ambiguity about what specifically gets updated. The description is functional but lacks specificity about scope or differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'create-schema' or 'update-table-config'. It doesn't mention prerequisites (e.g., schema must exist), exclusions, or contextual triggers. The agent must infer usage from the tool name alone, which is insufficient for informed selection among siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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