Skip to main content
Glama
gigapi

GigAPI MCP Server

by gigapi

list_databases

Retrieve all database names from your GigAPI cluster to manage timeseries data storage and organization.

Instructions

List all databases on your GigAPI cluster.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
input_dataYes

Implementation Reference

  • The main tool handler function that lists databases by calling the client method and formats the response with success status and count.
    def list_databases(self, database: str = "mydb") -> Dict[str, Any]:
        """List all databases on GigAPI.
    
        Returns:
            List of databases
        """
        try:
            databases = self.client.list_databases(database)
            return {
                "databases": databases,
                "success": True,
                "count": len(databases)
            }
        except GigAPIClientError as e:
            logger.error(f"Failed to list databases: {e}")
            return {
                "error": str(e),
                "success": False,
                "databases": []
            }
  • Registration of the 'list_databases' tool using FastMCP Tool.from_function with a lambda to handle input data.
    Tool.from_function(
        lambda input_data: tools_instance.list_databases(input_data.get("database", "mydb")),
        name="list_databases",
        description="List all databases on your GigAPI cluster.",
    ),
  • Helper method in the GigAPIClient that executes the 'SHOW DATABASES' SQL query and extracts database names from the response.
    def list_databases(self, database: str = "mydb") -> List[str]:
        """List all databases.
    
        Returns:
            List of database names
        """
        query = "SHOW DATABASES"
        response = self.execute_query(query, database)
        logger.debug(f"Raw SHOW DATABASES response: {response}")
        if response.error:
            raise GigAPIClientError(f"Failed to list databases: {response.error}")
    
        # Extract database names from NDJSON results
        databases = []
        for result in response.results:
            if "database_name" in result:
                databases.append(result["database_name"])
            elif "name" in result:
                databases.append(result["name"])
            elif "databases" in result:
                databases.extend(result["databases"])
    
        return databases
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 tool lists databases but doesn't mention whether this is a read-only operation, if it requires authentication, what format the output returns, or any rate limits. The description is minimal and lacks critical behavioral context 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.

Conciseness5/5

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

The description is a single, efficient sentence with zero waste. It's appropriately sized for a simple listing tool and front-loads the core purpose immediately, making it easy to parse quickly.

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 tool's complexity (1 undocumented parameter, no annotations, no output schema), the description is incomplete. It doesn't address parameter usage, output format, or behavioral traits, making it inadequate for the agent to understand how to invoke the tool correctly beyond a basic conceptual understanding.

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

Parameters1/5

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

The input schema has 1 required parameter ('input_data') with 0% description coverage, and the tool description provides no information about parameters. The description doesn't explain what 'input_data' should contain, its purpose, or format, leaving the parameter completely undocumented and unusable without external knowledge.

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 all databases') and resource ('on your GigAPI cluster'), providing a specific verb+resource combination. However, it doesn't distinguish itself from sibling tools like 'list_tables' or 'get_table_schema' in terms of scope or hierarchy, which prevents a perfect score.

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 like 'list_tables' or 'run_select_query'. There are no explicit when/when-not instructions or prerequisites mentioned, leaving the agent to infer usage context from the tool name 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

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/gigapi/gigapi-mcp'

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