Skip to main content
Glama
timeplus-io

mcp-timeplus

by timeplus-io

list_databases

Retrieve a list of available databases in Timeplus for streaming data platforms like Apache Kafka and Pulsar.

Instructions

List available Timeplus databases

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The `list_databases` function is the core handler. It is decorated with @mcp.tool(), creates a Timeplus client, runs 'SHOW DATABASES', and returns the result.
    @mcp.tool()
    def list_databases():
        """List available Timeplus databases"""
        logger.info("Listing all databases")
        client = create_timeplus_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 `list_databases` as an MCP tool on the FastMCP server instance.
    @mcp.tool()
  • The `create_timeplus_client` helper function is called by `list_databases` to establish a connection to Timeplus.
    def create_timeplus_client():
        client_config = config.get_client_config()
        logger.info(
            f"Creating Timeplus client connection to {client_config['host']}:{client_config['port']} "
            f"as {client_config['username']} "
            f"(secure={client_config['secure']}, verify={client_config['verify']}, "
            f"connect_timeout={client_config['connect_timeout']}s, "
            f"send_receive_timeout={client_config['send_receive_timeout']}s)"
        )
    
        try:
            client = timeplus_connect.get_client(**client_config)
            # Test the connection
            version = client.server_version
            logger.info(f"Successfully connected to Timeplus server version {version}")
            return client
        except Exception as e:
            logger.error(f"Failed to connect to Timeplus: {str(e)}")
            raise
  • The function has no parameters (no input schema needed) and returns the raw result (a list of database names) from the SHOW DATABASES command.
    @mcp.tool()
    def list_databases():
        """List available Timeplus databases"""
        logger.info("Listing all databases")
        client = create_timeplus_client()
        result = client.command("SHOW DATABASES")
        logger.info(f"Found {len(result) if isinstance(result, list) else 1} databases")
        return result
Behavior2/5

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

No annotations are provided, so the description should disclose behavioral traits. It only says 'list', implying read-only, but lacks detail on auth requirements or side effects. For a trivial tool this is marginal, but more context could be added.

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?

Single sentence with no filler. Every word earns its place. Perfectly concise.

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

Completeness4/5

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

Given the tool's simplicity (no parameters, no output schema), the description is largely complete. However, it does not specify the return format, which might be helpful.

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 no parameters, and schema coverage is 100% (with no params). No additional parameter information is needed, so the description is adequate.

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

Purpose5/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 (Timeplus databases), effectively distinguishing it from siblings like list_tables which lists tables.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use versus alternatives, but the simple nature of the tool implies usage for listing databases. The sibling tools cover different operations, so context is implied.

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/timeplus-io/mcp-timeplus'

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