Skip to main content
Glama
rickyb30

DataPilot MCP Server

by rickyb30

list_warehouses

Retrieve available Snowflake warehouses for database operations and resource management through the DataPilot MCP Server.

Instructions

List all warehouses available to the user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main tool handler for 'list_warehouses', decorated with @mcp.tool() for registration. It gets the Snowflake client, calls its list_warehouses method, and returns the list of warehouses.
    @mcp.tool()
    async def list_warehouses(ctx: Context) -> List[Dict[str, Any]]:
        """List all warehouses available to the user"""
        await ctx.info("Retrieving list of warehouses...")
        
        try:
            client = await get_snowflake_client()
            warehouses = await client.list_warehouses()
            await ctx.info(f"Found {len(warehouses)} warehouses")
            return warehouses
            
        except Exception as e:
            logger.error(f"Error listing warehouses: {str(e)}")
            await ctx.error(f"Failed to list warehouses: {str(e)}")
            return []
  • Helper method in SnowflakeClient class that executes 'SHOW WAREHOUSES' query and returns the results.
    async def list_warehouses(self) -> List[Dict[str, Any]]:
        """List all warehouses user has access to"""
        result = await self.execute_query("SHOW WAREHOUSES")
        return result.data if result.success else []
  • src/main.py:237-252 (registration)
    The @mcp.tool() decorator registers this function as an MCP tool named 'list_warehouses'.
    @mcp.tool()
    async def list_warehouses(ctx: Context) -> List[Dict[str, Any]]:
        """List all warehouses available to the user"""
        await ctx.info("Retrieving list of warehouses...")
        
        try:
            client = await get_snowflake_client()
            warehouses = await client.list_warehouses()
            await ctx.info(f"Found {len(warehouses)} warehouses")
            return warehouses
            
        except Exception as e:
            logger.error(f"Error listing warehouses: {str(e)}")
            await ctx.error(f"Failed to list warehouses: {str(e)}")
            return []
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 of behavioral disclosure. It states it 'lists all warehouses available to the user', implying a read-only operation that returns a list, but doesn't disclose key traits like pagination, rate limits, authentication requirements, error conditions, or what 'available to the user' means (e.g., permissions-based filtering). For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 with zero waste. It's front-loaded with the core action ('List all warehouses') and adds necessary context ('available to the user'). Every word earns its place, making it highly efficient and easy to parse.

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 low complexity (0 parameters, simple list operation) and the presence of an output schema (which handles return values), the description is minimally adequate. However, with no annotations and incomplete behavioral disclosure, it doesn't fully cover aspects like authentication or operational constraints. It meets the basic need but lacks depth for confident agent use.

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 input schema has 0 parameters with 100% coverage, so no parameters need documentation. The description appropriately doesn't discuss parameters, focusing on the tool's purpose. Baseline for 0 parameters is 4, as the description doesn't need to compensate for any schema gaps.

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 verb ('List') and resource ('warehouses'), specifying 'all warehouses available to the user'. It distinguishes from siblings like 'get_warehouse_status' (which checks status) and 'list_databases/tables/schemas' (which list different resources). However, it doesn't explicitly differentiate from all siblings, such as 'describe_table' or 'analyze_query_results', though those are clearly different operations.

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. It doesn't mention prerequisites (e.g., authentication), when to use 'list_warehouses' vs 'get_warehouse_status' (for status checks) or other listing tools like 'list_databases', or any exclusions. The agent must infer usage from the name and context 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/rickyb30/datapilot-mcp-server'

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