Skip to main content
Glama
sussa3007

MySql MCP Server

status

Verify the connection status of your MySQL database to ensure seamless operations and troubleshoot connectivity issues effectively.

Instructions

Check the current database connection status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
random_stringYesDummy parameter for no-parameter tools

Implementation Reference

  • Handler for the 'status' tool: checks if database connection exists and returns JSON with connection details or disconnection message.
    case "status": {
      if (!connection) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(
                {
                  connected: false,
                  message:
                    "Database not connected. Need to use 'connect' tool after checking current environment variable information. The password is sensitive information and is stored in an environment variable, so it is not required in the request parameters.",
                  host: connectionConfig.host,
                  port: connectionConfig.port,
                  user: connectionConfig.user,
                  database: connectionConfig.database,
                  readonly: connectionConfig.readonly
                },
                null,
                2
              )
            }
          ],
          isError: false
        };
      }
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              {
                connected: true,
                host: connectionConfig.host,
                port: connectionConfig.port,
                user: connectionConfig.user,
                database: connectionConfig.database,
                threadId: connection.threadId,
                readonly: connectionConfig.readonly
              },
              null,
              2
            )
          }
        ],
        isError: false
      };
    }
  • Input schema for 'status' tool, defines a required dummy 'random_string' parameter since MCP requires at least one parameter.
    inputSchema: {
      type: "object",
      properties: {
        random_string: {
          type: "string",
          description: "Dummy parameter for no-parameter tools"
        }
      },
      required: ["random_string"]
    }
  • src/index.ts:139-152 (registration)
    Registration of the 'status' tool in the listTools response, providing name, description, and schema.
    {
      name: "status",
      description: "Check the current database connection status.",
      inputSchema: {
        type: "object",
        properties: {
          random_string: {
            type: "string",
            description: "Dummy parameter for no-parameter tools"
          }
        },
        required: ["random_string"]
      }
    },

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations exist, so the description carries full burden. It implies a read operation but does not disclose side effects, authentication needs, rate limits, or return format. The phrase 'check' is vague.

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 a single sentence with 6 words, highly concise and front-loaded. No extraneous information.

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?

For a simple status check, the description is minimally adequate. However, it lacks information about the return value (e.g., format, fields) and any potential side effects, making it slightly incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description does not address the single parameter 'random_string', which is a dummy required parameter. The schema already describes it, but the description misses an opportunity to clarify that it can be ignored.

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 clearly states the tool checks the current database connection status, using a specific verb and resource. It is distinguishable from siblings like connect and disconnect. However, it could be more precise about what 'status' entails.

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?

No guidance is provided on when to use this tool versus alternatives (e.g., connect for establishing a connection). There is no mention of prerequisites or context.

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

Deploy Server

Other Tools

Related Tools