Skip to main content
Glama
shibbirweb

mcp-mysql-read-only

by shibbirweb

Switch Database

use_database
Idempotent

Switch the active database on the current MySQL server immediately, no restart needed. Choose the database by name to change the working context.

Instructions

Switch the active database on the current MySQL server. Takes effect immediately, no restart needed

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseYesDatabase name to switch to

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.5

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, and destructiveHint=false. The description adds 'Takes effect immediately, no restart needed', which conveys that the operation is a live runtime change without requiring server restart—useful behavioral context beyond what the annotations capture.

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 with zero filler. The core action is front-loaded first, and the immediate-effect note earns its place by providing behavioral nuance. Every word contributes to the agent's understanding.

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 simple one-parameter switch operation with no output schema and comprehensive annotations, the description is nearly complete. It could explicitly mention that the target database must already exist or that the change is session-scoped, but these are minor gaps given the tool's simplicity and context from sibling list_databases.

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 input schema has 100% description coverage: the single 'database' parameter is clearly documented as 'Database name to switch to'. The tool description does not add syntax, format, or existence requirements beyond the schema, so the baseline score of 3 is appropriate; nothing is missing, but nothing extra is contributed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Switch'), a clear resource ('the active database'), and scopes it to 'the current MySQL server'. This distinguishes it from sibling tools like use_connection, which operates on connections, and list_databases, which only lists. No ambiguity remains about the tool's function.

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?

The description implies usage context by stating 'current MySQL server' and 'Takes effect immediately', suggesting it changes the session's default schema for subsequent operations. However, it does not explicitly name alternatives, exclusion conditions, or when to prefer run_query or use_connection instead. Guidance is present but left to inference.

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