Skip to main content
Glama
startreedata

StarTree MCP Server for Apache Pinot

Official
by startreedata

index-column-details

Retrieve detailed index and column information for a specific segment in Apache Pinot tables to analyze and optimize data structure and query performance.

Instructions

Get index/column details for a segment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
segmentNameYes
tableNameYes

Implementation Reference

  • MCP tool handler for 'index-column-details'. This function is decorated with @mcp.tool (FastMCP registration) and delegates to PinotClient.get_index_column_detail, returning JSON results.
    @mcp.tool
    def index_column_details(tableName: str, segmentName: str) -> str:
        """Get index/column details for a segment"""
        try:
            results = pinot_client.get_index_column_detail(
                tableName=tableName,
                segmentName=segmentName,
            )
            return json.dumps(results, indent=2)
        except Exception as e:
            return f"Error: {str(e)}"
  • Core implementation logic in PinotClient that fetches segment metadata details (with columns=*) via HTTP to Pinot controller endpoints for both REALTIME and OFFLINE table types.
    def get_index_column_detail(
        self,
        tableName: str,
        segmentName: str,
        params: dict[str, Any] | None = None,
    ) -> dict[str, Any]:
        for type_suffix in ["REALTIME", "OFFLINE"]:
            endpoint = PinotEndpoints.SEGMENT_DETAIL.format(
                tableName, type_suffix, segmentName
            )
            url = f"{self.config.controller_url}/{endpoint}"
            logger.debug(f"Trying to fetch index column details from: {url}")
            try:
                response = self.http_request(url)
                return response.json()
            except Exception as e:
                error_msg = (
                    f"Failed to fetch index column details for "
                    f"{tableName}_{type_suffix}/{segmentName}: {e}"
                )
                logger.error(error_msg)
                continue
        raise ValueError("Index column detail not found")
  • Defines the SEGMENT_DETAIL endpoint pattern used: 'segments/{}_{}/{}/metadata?columns=*' for fetching column details.
    class PinotEndpoints:
        QUERY_SQL = "query/sql"
        TABLES = "tables"
        SCHEMAS = "schemas"
        TABLE_SIZE = "tables/{}/size"
        SEGMENTS = "segments/{}"
        SEGMENT_METADATA = "segments/{}/metadata"
        SEGMENT_DETAIL = "segments/{}_{}/{}/metadata?columns=*"
        TABLE_CONFIG = "tableConfigs/{}"
  • Input schema defined by type hints: tableName (str), segmentName (str) -> str (JSON output).
    def index_column_details(tableName: str, segmentName: str) -> str:
        """Get index/column details for a segment"""
  • Tool description in prompt template for the AI assistant.
    5. index-column-details: Get index details for a specific column in a table
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 'Get' which implies a read-only operation, but it doesn't clarify if this requires specific permissions, what the return format is (e.g., structured data, error handling), or any rate limits. The description is minimal and lacks essential behavioral context for safe and effective use.

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

Conciseness4/5

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

The description is a single, efficient sentence with no wasted words, making it easy to parse. However, it's front-loaded but under-specified—while concise, it lacks the necessary detail to be fully helpful, balancing brevity with insufficient information.

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 complexity of a tool with 2 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It doesn't explain what 'index/column details' include, how results are structured, or any dependencies, making it inadequate for the agent to understand the tool's full context and usage.

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?

The schema description coverage is 0%, so the description must compensate for undocumented parameters. It mentions 'for a segment', which hints at the 'segmentName' parameter, but doesn't explain what 'segment' means or how it relates to 'tableName'. No additional semantics are provided for the two required parameters, leaving their purpose and usage unclear beyond the schema's basic types.

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 'Get index/column details for a segment' clearly states the action (get) and resource (index/column details), but it's vague about what 'details' entail and doesn't differentiate from siblings like 'segment-metadata-details' or 'table-details'. It specifies the scope ('for a segment') but lacks precision about the output format or depth of information.

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?

No explicit guidance on when to use this tool versus alternatives like 'segment-metadata-details' or 'table-details' is provided. The description implies usage for retrieving index/column information related to a segment, but it doesn't specify prerequisites, exclusions, or comparative contexts with sibling tools, leaving the agent to infer usage based on tool names alone.

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