Skip to main content
Glama
cgrdavies

mcp-clickhouse-long-running

by cgrdavies

list_databases

Retrieve a list of all available ClickHouse databases on the mcp-clickhouse-long-running server for database querying and management.

Instructions

List available ClickHouse databases

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_databases' tool. It is decorated with @mcp.tool() which registers the tool with the MCP server. The function connects to the ClickHouse client and executes the SHOW DATABASES command to list all available databases.
    @mcp.tool()
    def list_databases():
        """List available ClickHouse databases"""
        logger.info("Listing all databases")
        client = create_clickhouse_client()
        result = client.command("SHOW DATABASES")
        logger.info(f"Found {len(result) if isinstance(result, list) else 1} databases")
        return result
  • The @mcp.tool() decorator registers the list_databases function as an MCP tool.
    @mcp.tool()
    def list_databases():
        """List available ClickHouse databases"""
        logger.info("Listing all databases")
        client = create_clickhouse_client()
        result = client.command("SHOW DATABASES")
        logger.info(f"Found {len(result) if isinstance(result, list) else 1} databases")
        return result
  • Exports the list_databases function from mcp_server.py for use in other modules, such as tests.
    from .mcp_server import (
        create_clickhouse_client,
        list_databases,
        list_tables,
        run_select_query,
    )
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 but doesn't cover key aspects like whether this is a read-only operation, if it requires specific permissions, potential rate limits, or what the output format looks like (e.g., list of names or detailed metadata).

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, clear sentence that front-loads the essential information without any wasted words. It's appropriately sized for a simple tool with no parameters.

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 simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. However, it lacks context about behavioral traits and usage guidelines, which are important even for simple tools to ensure correct agent invocation.

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 tool has 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description appropriately doesn't add unnecessary details, aligning with the lack of inputs.

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 clearly states the action ('List') and resource ('available ClickHouse databases'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'list_tables' beyond the resource name, missing an explicit distinction.

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 like 'list_tables' or 'run_select_query'. The description lacks context about prerequisites, such as whether authentication is needed or if it's for exploration versus query execution.

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/cgrdavies/mcp-clickhouse'

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