Skip to main content
Glama
pickstar-2002

MySQL MCP Server

mysql_drop_database

Removes a MySQL database by specifying its name. Use this tool to manage database cleanup and resource allocation on the MySQL MCP Server.

Instructions

删除数据库

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes数据库名称

Implementation Reference

  • MCP tool handler for 'mysql_drop_database' that extracts database name from arguments and delegates to DatabaseManager.dropDatabase, returning success message
    private async handleDropDatabase(args: { name: string }): Promise<any> { await this.dbManager.dropDatabase(args.name); return { content: [ { type: 'text', text: `成功删除数据库: ${args.name}`, }, ], }; }
  • Core implementation executing the DROP DATABASE SQL command via the generic query method
    async dropDatabase(name: string): Promise<void> { await this.query(`DROP DATABASE \`${name}\``); }
  • Tool schema definition including name, description, and input schema requiring 'name' string
    { name: 'mysql_drop_database', description: '删除数据库', inputSchema: { type: 'object', properties: { name: { type: 'string', description: '数据库名称' }, }, required: ['name'], }, },
  • src/server.ts:241-242 (registration)
    Registration in the tool dispatcher switch statement mapping tool name to handler
    case 'mysql_drop_database': return await this.handleDropDatabase(args as any);

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

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