Skip to main content
Glama
enemyrr

MCP-MySQL Server

list_tables

Retrieve a list of all tables in your MySQL database using this tool. Simplify schema management and streamline database operations for enhanced efficiency.

Instructions

List all tables in the database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the 'SHOW TABLES' query and returns the list of tables as JSON text content.
    private async handleListTables() {
      const rows = await this.executeQuery('SHOW TABLES');
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(rows, null, 2),
          },
        ],
      };
    }
  • Input schema for the list_tables tool, which takes no parameters.
    inputSchema: {
      type: 'object',
      properties: {},
      required: [],
    },
  • src/index.ts:468-475 (registration)
    Registration of the list_tables tool in the tools array, defining its name, description, and input schema.
      name: 'list_tables',
      description: 'List all tables in the database',
      inputSchema: {
        type: 'object',
        properties: {},
        required: [],
      },
    },
  • src/index.ts:577-578 (registration)
    Dispatch in the request handler switch statement that routes 'list_tables' calls to the handler function.
    case 'list_tables':
      return await this.handleListTables();
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 what the tool does but doesn't reveal any behavioral traits: no information about permissions needed, whether it's read-only or has side effects, rate limits, output format, or pagination. For a tool with zero annotation coverage, this is a significant gap.

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 core functionality without any wasted words. It's appropriately sized for a simple tool and front-loads the essential information ('List all tables').

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 simplicity (0 parameters) but lack of annotations and output schema, the description is incomplete. It doesn't address what the output looks like (e.g., table names, metadata, format), potential limitations, or how it differs from sibling tools. For a tool in a database context with multiple related tools, more context would be 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 tool has zero parameters, and schema description coverage is 100% (though empty). The description doesn't need to compensate for missing parameter documentation since there are none. A baseline of 4 is appropriate as the description accurately reflects the parameterless nature of the tool.

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') and resource ('all tables in the database'), making the tool's purpose immediately understandable. It doesn't explicitly differentiate from siblings like 'describe_table' or 'query', but the verb+resource combination is specific enough for basic understanding.

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 'describe_table' (for table details) or 'query' (for data retrieval). There's no mention of prerequisites, context, or exclusions, leaving the agent to infer usage 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

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/enemyrr/mcp-mysql-server'

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