Skip to main content
Glama
nilsir

MCP Server MySQL

by nilsir

drop_database

Delete a MySQL database from the MCP Server MySQL to remove unused or obsolete data storage structures.

Instructions

Drop/delete a database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseYesDatabase name

Implementation Reference

  • The asynchronous handler function that performs the DROP DATABASE operation using the MySQL connection pool and returns success response.
    async ({ database }) => { const p = await getPool(); await p.execute(`DROP DATABASE \`${database}\``); const output = { success: true, database }; return { content: [ { type: "text" as const, text: `Database ${database} dropped successfully`, }, ], structuredContent: output, }; }
  • Zod input schema defining the required 'database' parameter for the tool.
    { database: z.string().describe("Database name"), },
  • src/index.ts:469-492 (registration)
    The server.tool registration call that defines and registers the drop_database tool, including its name, description, input schema, and handler function.
    server.tool( "drop_database", "Drop/delete a database", { database: z.string().describe("Database name"), }, async ({ database }) => { const p = await getPool(); await p.execute(`DROP DATABASE \`${database}\``); const output = { success: true, database }; return { content: [ { type: "text" as const, text: `Database ${database} dropped successfully`, }, ], structuredContent: output, }; } );

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

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