Skip to main content
Glama
bpamiri

CockroachDB MCP Server

by bpamiri

show_zone_config

Retrieve zone configuration settings for CockroachDB tables to manage data distribution, replication, and storage policies across cluster nodes.

Instructions

Show zone configurations.

Args:
    table: Optional table to get zone config for.

Returns:
    Zone configuration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that executes the SQL queries to show zone configurations for a table or all.
    async def show_zone_config(table: str | None = None) -> dict[str, Any]:
        """Show zone configurations.
    
        Args:
            table: Optional table to get zone config for.
    
        Returns:
            Zone configuration.
        """
        conn = await connection_manager.ensure_connected()
    
        try:
            if table:
                query = f"SHOW ZONE CONFIGURATION FOR TABLE {table}"
            else:
                query = "SHOW ZONE CONFIGURATIONS"
    
            async with conn.cursor() as cur:
                await cur.execute(query)
                rows = await cur.fetchall()
    
            configs = []
            for row in rows:
                configs.append(
                    {
                        "target": row.get("target"),
                        "raw_config_sql": row.get("raw_config_sql"),
                    }
                )
    
            return {"zone_configs": configs, "count": len(configs), "table_filter": table}
        except Exception as e:
            return {"status": "error", "error": str(e)}
  • Tool registration using @mcp.tool() decorator. Delegates execution to the cluster module's implementation.
    async def show_zone_config(table: str | None = None) -> dict[str, Any]:
        """Show zone configurations.
    
        Args:
            table: Optional table to get zone config for.
    
        Returns:
            Zone configuration.
        """
        try:
            return await cluster.show_zone_config(table)
        except Exception as e:
            return {"status": "error", "error": str(e)}
Behavior2/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. It only states it 'shows' configurations, implying a read-only operation, but doesn't disclose behavioral traits like permissions needed, whether it's safe for production use, rate limits, or what happens if the table doesn't exist. This is a significant gap for a tool with no annotation coverage.

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 appropriately sized with a brief purpose statement and structured Args/Returns sections. It's front-loaded and wastes no words, though the 'Returns' section is redundant given the output schema, slightly reducing efficiency.

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?

Given the tool's moderate complexity (configuration display), no annotations, and an output schema that handles return values, the description is minimally adequate. It covers the basic purpose and parameter but lacks behavioral context and usage guidelines, leaving gaps in completeness.

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

Parameters4/5

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

The description adds meaningful context for the single parameter by explaining it's an 'Optional table to get zone config for,' which clarifies its purpose beyond the schema's basic 'Table' title. With 0% schema description coverage and only one parameter, this adequately compensates, though it could specify format or examples.

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 states the tool shows zone configurations, which is a clear verb+resource combination. However, it doesn't differentiate from sibling tools like 'show_ranges', 'show_regions', or 'show_statements' that also display system information, leaving the specific purpose somewhat vague in context.

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 guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, context (e.g., during database administration or troubleshooting), or exclusions, leaving the agent with no usage direction.

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/bpamiri/cockroachdb-mcp'

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