Skip to main content
Glama

list_databases

Retrieve all accessible databases on a MySQL server to identify available data sources for querying and analysis.

Instructions

List all accessible databases on the MySQL server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'list_databases' tool. Executes 'SHOW DATABASES' SQL query using the shared executeQuery function and returns the results as formatted JSON text content.
    case "list_databases": {
      console.error('[Tool] Executing list_databases');
      
      const { rows } = await executeQuery(
        pool,
        'SHOW DATABASES'
      );
      
      return {
        content: [{
          type: "text",
          text: JSON.stringify(rows, null, 2)
        }]
      };
    }
  • src/index.ts:66-74 (registration)
    Registration of the 'list_databases' tool in the ListTools response, including name, description, and empty input schema (no parameters required).
    {
      name: "list_databases",
      description: "List all accessible databases on the MySQL server",
      inputSchema: {
        type: "object",
        properties: {},
        required: []
      }
    },
  • Input schema definition for 'list_databases' tool: an empty object (no input parameters).
    inputSchema: {
      type: "object",
      properties: {},
      required: []
    }
Behavior3/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 indicates a read operation ('List') and implies accessibility constraints ('accessible databases'), but lacks details on permissions, rate limits, or output format. It adds some context but doesn't fully compensate for the absence of annotations, resulting in moderate transparency.

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 directly states the tool's purpose without any wasted words. It's front-loaded with the key action and resource, making it easy to understand quickly. Every part of the sentence contributes meaningfully to the tool's definition.

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, no output schema) and no annotations, the description is minimally adequate. It covers the basic purpose and scope but lacks details on behavioral aspects like permissions or output format. For a simple list tool, it's complete enough to be functional but could be enhanced with more context.

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 parameter information is needed. The description doesn't mention parameters, which is appropriate, and it adds value by clarifying the scope ('all accessible databases'). This exceeds the baseline of 3 for high schema coverage by providing useful context without redundancy.

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 specific action ('List') and resource ('all accessible databases on the MySQL server'), distinguishing it from siblings like list_tables (which lists tables within a database) and describe_table (which describes table structure). It precisely communicates what the tool does without being vague or tautological.

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?

The description implies usage by stating 'all accessible databases,' suggesting it's for discovering available databases, but it doesn't explicitly guide when to use this versus alternatives like list_tables or describe_table. No exclusions or specific contexts are provided, leaving usage somewhat inferred rather than clearly directed.

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/Himanshu-Agg12/mcp-mysql-lens'

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