Skip to main content
Glama
apache

Doris MCP Server

Official
by apache

get_db_list

Retrieve a complete list of database names stored on the Doris MCP Server using a unique identifier for each tool call.

Instructions

[Function Description]: Get a list of all database names on the server.

[Parameter Content]:

  • random_string (string) [Required] - Unique identifier for the tool call

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registers the 'get_db_list' tool with the MCP server using the @mcp.tool decorator, including description and parameter schema implied by function signature.
            # Get database list tool
            @mcp.tool(
                "get_db_list",
                description="""[Function Description]: Get a list of all database names on the server.
    
    [Parameter Content]:
    
    - catalog_name (string) [Optional] - Target catalog name for federation queries, defaults to current catalog
    """,
            )
            async def get_db_list_tool(catalog_name: str = None) -> str:
                """Get database list"""
                return await self.call_tool("get_db_list", {
                    "catalog_name": catalog_name
                })
  • Defines the input schema and description for the 'get_db_list' tool in the list_tools method for stdio mode.
                Tool(
                    name="get_db_list",
                    description="""[Function Description]: Get a list of all database names on the server.
    
    [Parameter Content]:
    
    - catalog_name (string) [Optional] - Target catalog name for federation queries, defaults to current catalog
    """,
                    inputSchema={
                        "type": "object",
                        "properties": {
                            "catalog_name": {"type": "string", "description": "Catalog name"},
                        },
                    },
                ),
  • Tool dispatcher in call_tool method routes 'get_db_list' calls to MetadataExtractor.get_db_list_for_mcp.
    async def _get_db_list_tool(self, arguments: Dict[str, Any]) -> Dict[str, Any]:
        """Get database list tool routing"""
        catalog_name = arguments.get("catalog_name")
        
        # Delegate to metadata extractor for processing
        return await self.metadata_extractor.get_db_list_for_mcp(catalog_name)
  • MCP-specific handler for get_db_list: formats response and calls core get_all_databases_async method.
    async def get_db_list_for_mcp(self, catalog_name: str = None) -> Dict[str, Any]:
        """Get list of all database names on server - MCP interface"""
        logger.info(f"Getting database list: Catalog: {catalog_name}")
        
        try:
            databases = await self.get_all_databases_async(catalog_name=catalog_name)
            return self._format_response(success=True, result=databases)
        except Exception as e:
            logger.error(f"Failed to get database list: {str(e)}", exc_info=True)
            return self._format_response(success=False, error=str(e), message="Error occurred while getting database list")
  • Core implementation: executes 'SHOW DATABASES' (or with catalog) query asynchronously and extracts database names.
    async def get_all_databases_async(self, catalog_name: str = None) -> List[str]:
        """Asynchronously get all database list"""
        try:
            effective_catalog = catalog_name or self.catalog_name
            
            if effective_catalog and effective_catalog != "internal":
                query = f"SHOW DATABASES FROM `{effective_catalog}`"
            else:
                query = "SHOW DATABASES"
            
            result = await self._execute_query_async(query)
            
            if not result:
                return []
            
            # Extract database names
            databases = []
            for row in result:
                if isinstance(row, dict):
                    # Get the value of the first field (usually Database field)
                    db_name = list(row.values())[0] if row else None
                    if db_name:
                        databases.append(db_name)
            
            return databases
            
        except Exception as e:
            logger.error(f"Failed to get database list: {e}")
            return []
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 what the tool does but doesn't mention any behavioral traits such as permissions required, rate limits, whether it's read-only or has side effects, or what the return format looks like. This is a significant gap for a tool with zero 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.

Conciseness3/5

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

The description is structured with sections for Function Description and Parameter Content, which is organized but includes unnecessary and incorrect parameter information. The Function Description sentence is clear, but the Parameter Content adds verbosity without value, reducing efficiency.

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 (simple list operation) but lack of annotations and output schema, the description is incomplete. It doesn't explain what the return value includes (e.g., format, pagination) or address behavioral aspects like error handling. For a tool with no structured support, more context is needed to be fully 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 input schema has 0 parameters with 100% coverage, so the schema fully documents the lack of parameters. The description incorrectly includes a parameter 'random_string' in the Parameter Content section, which contradicts the schema. However, since the baseline for 0 parameters is 4, and the description's error doesn't severely mislead about parameter usage (as the schema overrides it), it scores slightly above minimum.

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 ('Get') and resource ('list of all database names on the server'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_db_table_list' or 'exec_query', 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 'get_db_table_list' (which might list tables within a database) or other siblings. It lacks any context about prerequisites, exclusions, or comparative use cases, leaving the agent to infer usage.

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/apache/doris-mcp-server'

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