Skip to main content
Glama
startreedata

StarTree MCP Server for Apache Pinot

Official
by startreedata

create-schema

Generate and manage schemas for Apache Pinot using a structured JSON input, with options to override existing schemas or force creation when necessary.

Instructions

Create a new schema

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNo
overrideNo
schemaJsonYes

Implementation Reference

  • MCP tool handler for 'create_schema'. This function is decorated with @mcp.tool decorator which registers it as an MCP tool. It delegates to the pinot_client.create_schema method.
    @mcp.tool
    def create_schema(schemaJson: str, override: bool = True, force: bool = False) -> str:
        """Create a new schema"""
        try:
            results = pinot_client.create_schema(
                schemaJson,
                override,
                force,
            )
            return json.dumps(results, indent=2)
        except Exception as e:
            return f"Error: {str(e)}"
  • Helper method in PinotClient class that performs the HTTP POST request to the Pinot controller endpoint to create a new schema.
    def create_schema(
        self,
        schemaJson: str,
        override: bool = True,
        force: bool = False,
    ) -> dict[str, Any]:
        url = f"{self.config.controller_url}/{PinotEndpoints.SCHEMAS}"
        params = {"override": str(override).lower(), "force": str(force).lower()}
        headers = self._create_auth_headers()
        headers["Content-Type"] = "application/json"
        response = requests.post(
            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 creation request processed.",
                "response_body": response.text,
            }
Behavior1/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Create a new schema' implies a write/mutation operation, but it doesn't describe permissions needed, whether it's idempotent, what happens on conflicts, or any side effects. For a tool with 3 parameters and no annotation coverage, this is a significant gap in transparency.

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 extremely concise with a single sentence ('Create a new schema'), which is front-loaded and wastes no words. While it's under-specified, it's not verbose or poorly structured—it efficiently states the core action without unnecessary elaboration.

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

Completeness1/5

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

Given the complexity (a mutation tool with 3 parameters, no annotations, and no output schema), the description is completely inadequate. It doesn't explain what the tool returns, how to handle errors, or the meaning of parameters. For a tool that likely creates database schemas with configuration options, this lacks essential context for effective use.

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

Parameters1/5

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

Schema description coverage is 0%, meaning none of the 3 parameters (force, override, schemaJson) are documented in the schema. The description adds no information about these parameters—it doesn't explain what schemaJson should contain, when to use force or override, or their interactions. With low coverage and no compensation in the description, this fails to provide parameter semantics.

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

Purpose2/5

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

The description 'Create a new schema' is a tautology that merely restates the tool name without adding specificity. It doesn't explain what kind of schema is being created, what resource it affects, or how it differs from sibling tools like 'update-schema' or 'get-schema'. While it uses a clear verb ('Create'), it lacks the resource and scope details needed for full clarity.

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. With siblings like 'update-schema' and 'get-schema', it doesn't specify if this is for initial creation only, what prerequisites might exist, or when to choose it over other tools. There's no mention of context, exclusions, or alternatives, leaving usage ambiguous.

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