Skip to main content
Glama
pickstar-2002

MySQL MCP Server

mysql_drop_table

Remove a table from a MySQL database by specifying the table name. This tool helps manage database structure by deleting unnecessary tables.

Instructions

删除表

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableNameYes表名称

Implementation Reference

  • MCP tool handler for 'mysql_drop_table'. Extracts tableName argument and delegates to DatabaseManager.dropTable, returning success message.
    private async handleDropTable(args: { tableName: string }): Promise<any> {
      await this.dbManager.dropTable(args.tableName);
      
      return {
        content: [
          {
            type: 'text',
            text: `成功删除表: ${args.tableName}`,
          },
        ],
      };
    }
  • Tool schema registration including input schema for 'mysql_drop_table' (requires tableName).
    {
      name: 'mysql_drop_table',
      description: '删除表',
      inputSchema: {
        type: 'object',
        properties: {
          tableName: { type: 'string', description: '表名称' },
        },
        required: ['tableName'],
      },
    },
  • src/server.ts:249-250 (registration)
    Switch case in CallToolRequestSchema handler that routes 'mysql_drop_table' calls to handleDropTable.
    case 'mysql_drop_table':
      return await this.handleDropTable(args as any);
  • DatabaseManager helper method that executes the actual DROP TABLE SQL statement via the query method.
    async dropTable(tableName: string): Promise<void> {
      await this.query(`DROP TABLE \`${tableName}\``);
    }
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. '删除表' implies a destructive mutation, but it doesn't specify critical traits like whether it's irreversible, requires specific permissions, affects related data (e.g., foreign keys), or has side effects. This is a significant gap for a destructive 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.

Conciseness5/5

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

The description is extremely concise with just two characters ('删除表'), which is front-loaded and wastes no words. For a simple tool, this brevity is appropriate, though it may sacrifice clarity.

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 (destructive database operation), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral risks, prerequisites, or return values, leaving the agent under-informed. This is inadequate for a mutation tool in a database context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with 'tableName' documented as '表名称' (table name). The description adds no meaning beyond this, as it doesn't explain parameter usage, constraints, or examples. However, with high schema coverage, the baseline is 3, as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description '删除表' (delete table) states a clear verb ('delete') and resource ('table'), which is better than a tautology. However, it lacks specificity about what exactly gets deleted (e.g., structure, data, or both) and doesn't distinguish it from siblings like 'mysql_drop_database' or 'mysql_delete' (which might delete rows). This makes it vague but functional.

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., needing a connection), exclusions (e.g., not for deleting rows), or comparisons to siblings like 'mysql_delete' or 'mysql_drop_database'. This leaves the agent without context for tool selection.

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/pickstar-2002/mysql-mcp'

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