Skip to main content
Glama
MCP Server for MariaDB/MySQL

MCP Server for MariaDB/MySQL

by Zdendys79

switch_database

Switch the active database before executing queries. Specify the target database name to run subsequent SQL operations against it.

Instructions

Switch to a different database. Must be called before executing queries.

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": "<database>"
    },
    "name": "switch_database"
  }
}

Input Schema

NameRequiredDescriptionDefault
databaseYesName of the database to switch to

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description carries the full behavioral burden. It usefully discloses that the operation changes session state and imposes ordering, but says nothing about whether the switch persists, what happens if the database name is invalid, or whether it affects concurrent callers.

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?

Two short sentences, purpose first and precondition second, with no filler. Every sentence earns its place.

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

Completeness4/5

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

For a single-parameter, non-nested tool with no output schema and no annotations, the description covers what it does and the mandatory precondition. The remaining gaps are failure behavior and session scope, which are secondary for a tool this simple.

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 single parameter is fully documented in the schema ('Name of the database to switch to') at 100% coverage, so the baseline is 3. The description adds no format, matching, or case-sensitivity guidance beyond the schema.

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 to a different database'), which is immediately distinguishable from siblings like execute_sql or list_databases. It stops short of naming any sibling or clarifying how it relates to get_current_database.

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

Usage Guidelines4/5

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

'Must be called before executing queries' is an explicit, actionable precondition that tells the agent when this tool is required. It does not state any when-not conditions or name the alternative tools that would otherwise be used.

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