Skip to main content
Glama
MySQL Automation MCP Server

MySQL Automation MCP Server

Use Database

use_database

Switch the active MySQL database at runtime by validating the database exists, updating the connection pool context, and persisting the new configuration.

Instructions

Switch the active MySQL database at runtime. Validates that the database exists, switches connection pool context, and updates persistent configuration.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "database_name": "<database_name>"
    },
    "name": "use_database"
  }
}

Input Schema

NameRequiredDescriptionDefault
database_nameYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does disclose real side effects: existence validation, a switch of the shared connection pool context, and a persistent configuration update that outlives the call. It still omits failure behavior (what happens when validation fails) and whether other sessions/connections are affected.

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?

Three short clauses, each adding distinct information, with the primary action front-loaded ahead of its side effects. No filler or restated naming.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, and the side-effect disclosure is good. However, for a stateful, persistent configuration mutation with zero annotations, the description should say what a failed validation does and whether the change is connection-scoped or global.

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?

Schema coverage is 0% and the single parameter has no description of its own, so the description must compensate. It adds partial meaning by implying database_name must be an existing database (it will be validated), but says nothing about format, casing, or qualification rules.

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?

States a specific verb and resource ("Switch the active MySQL database at runtime") plus the operational level (connection pool context), so an agent can tell it apart from execute_query or list_databases. It stops short of naming when a sibling like configure_connection would be the better choice.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: an agent must infer that this is called when queries need to target a different database than the current connection default. There is no explicit when-to-use statement, no prerequisites, and no pointer to list_databases for discovering valid names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.