Skip to main content
Glama
jason-ung

starrocks-mcp

by jason-ung

describe_table

Retrieve table schema and column details from StarRocks databases to understand data structure and enable accurate query formulation.

Instructions

Get table schema and column information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYesTable name
databaseNoDatabase name (optional, defaults to 'ads')

Implementation Reference

  • The handler logic for "describe_table" tool, which parses arguments and calls the client method.
    elif name == "describe_table":
        table = arguments.get("table")
        database = arguments.get("database")
        if not table:
            raise ValueError("table name is required")
    
        schema = client.describe_table(table, database)
        db_name = database or config.database
        return [
            TextContent(
                type="text",
                text=f"Schema for table '{db_name}.{table}':\n\n{format_json(schema)}",
            )
        ]
  • The actual implementation of "describe_table" in the StarRocksClient class, which executes the DESCRIBE SQL command.
    def describe_table(self, table: str, database: Optional[str] = None) -> List[Dict[str, Any]]:
        """Get table schema."""
        db = database or self.config.database
        validated_db = validate_identifier(db, "database")
        validated_table = validate_identifier(table, "table")
        return self.execute_query(f"DESCRIBE `{validated_db}`.`{validated_table}`")
  • The tool registration and schema definition for "describe_table".
    Tool(
        name="describe_table",
        description="Get table schema and column information",
        inputSchema={
            "type": "object",
            "properties": {
                "table": {
                    "type": "string",
                    "description": "Table name",
                },
                "database": {
                    "type": "string",
                    "description": "Database name (optional, defaults to 'ads')",
                },
            },
            "required": ["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, yet it only states the basic action. It does not clarify that this is a safe read-only operation, what format the schema information returns in, or how errors (e.g., table not found) are handled.

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 at five words, with the action verb front-loaded. There is no redundancy or wasteful text—every word contributes to understanding the tool's purpose.

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

Completeness3/5

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

For a simple two-parameter introspection tool with complete schema coverage, the description is minimally adequate. However, given the lack of annotations and output schema, it could have benefited from mentioning the specific information returned (data types, constraints, indexes).

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

Parameters3/5

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

Schema description coverage is 100%, meaning the schema already documents both 'table' and 'database' parameters including the default value. The description adds no additional parameter context, but the baseline score of 3 is appropriate given the complete schema coverage.

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

Purpose4/5

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

The description states a clear action ('Get') and resource ('table schema and column information'), accurately describing the tool's function. However, it lacks explicit differentiation from sibling tools like 'list_tables', which could confuse agents about whether this returns metadata or just names.

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 (e.g., when to use 'describe_table' vs 'execute_query' with a DESCRIBE statement). There are no prerequisites, workflow hints, or explicit exclusions mentioned.

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

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/jason-ung/starrocks-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server