Skip to main content
Glama
rickyb30

DataPilot MCP Server

by rickyb30

list_databases

Retrieve all available databases for user access to enable data exploration and management operations.

Instructions

List all databases available to the user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'list_databases' MCP tool. It retrieves the list of available Snowflake databases using the SnowflakeClient and returns them as a list of strings.
    @mcp.tool()
    async def list_databases(ctx: Context) -> List[str]:
        """List all databases available to the user"""
        await ctx.info("Retrieving list of databases...")
        
        try:
            client = await get_snowflake_client()
            databases = await client.list_databases()
            await ctx.info(f"Found {len(databases)} databases")
            return databases
            
        except Exception as e:
            logger.error(f"Error listing databases: {str(e)}")
            await ctx.error(f"Failed to list databases: {str(e)}")
            return []
  • src/main.py:105-105 (registration)
    The @mcp.tool() decorator registers the list_databases function as an MCP tool.
    @mcp.tool()
  • Helper method in SnowflakeClient class that executes the 'SHOW DATABASES' SQL command to list databases the user has access to.
    async def list_databases(self) -> List[str]:
        """List all databases user has access to"""
        result = await self.execute_query("SHOW DATABASES")
        return [row.get('name', '') for row in result.data if result.success]
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool lists databases but doesn't describe return format, pagination, authentication requirements, rate limits, or any side effects. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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 that communicates the essential purpose without any wasted words. It's appropriately sized for a simple listing tool and front-loads the core functionality.

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, output schema exists), the description is adequate but minimal. With no annotations and an output schema, it covers the basic purpose but lacks behavioral context that would help an agent understand how to properly interpret results or handle edge cases.

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 with 100% schema description coverage, so the schema already fully documents the parameter situation. The description appropriately doesn't discuss parameters, maintaining focus on the tool's purpose. Baseline for 0 parameters with high schema coverage is 4.

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 tool's purpose with a specific verb ('List') and resource ('databases'), and specifies scope ('all databases available to the user'). It doesn't explicitly differentiate from sibling tools like 'list_schemas' or 'list_tables', but the resource specificity provides implicit differentiation.

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_schemas' or 'list_tables', nor does it mention prerequisites or context for usage. It simply states what the tool does without any usage context.

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/rickyb30/datapilot-mcp-server'

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