Skip to main content
Glama
nilsir

MCP Server MySQL

by nilsir

drop_database

Delete a MySQL database to remove its structure and data. Use this tool to permanently eliminate databases from your MySQL server.

Instructions

Drop/delete a database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseYesDatabase name

Implementation Reference

  • Handler function that executes the drop_database tool: obtains database pool, executes DROP DATABASE query, and returns success response with structured content.
    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,
      };
    }
  • Input schema using Zod, defining the required 'database' string parameter.
    {
      database: z.string().describe("Database name"),
    },
  • src/index.ts:469-492 (registration)
    Registration of the 'drop_database' tool via server.tool(), specifying name, description, input schema, and inline 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,
        };
      }
    );
Behavior2/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 implies a destructive operation ('drop/delete') but doesn't clarify if this is irreversible, requires specific permissions, or has side effects on dependent objects. For a high-risk tool, this is a significant gap in 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 extremely concise—a single phrase with zero wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly. This efficiency is appropriate for a simple, single-parameter tool.

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 high-risk nature of dropping a database, the description is inadequate. With no annotations, no output schema, and minimal behavioral context, it fails to address critical aspects like irreversibility, permissions, or confirmation steps. The schema covers the parameter, but overall completeness is poor for such a destructive operation.

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 schema description coverage is 100%, with the single parameter 'database' documented as 'Database name' in the schema. The description adds no additional semantic context about the parameter (e.g., format, constraints, or examples), so it meets the baseline for high schema coverage without enhancing understanding.

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 'Drop/delete a database' clearly states the action (drop/delete) and the resource (database), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'drop_table' or 'drop_index' beyond the resource type, which prevents a perfect score.

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 to connect first), warn about destructive consequences, or suggest alternatives like 'list_databases' for verification. This leaves the agent with minimal context for decision-making.

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

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