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"]
      }
    },
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 states the tool checks status but doesn't reveal what information is returned (e.g., connection health, latency, error details), whether it's safe to call repeatedly, or if it has side effects. This leaves significant gaps for a tool that might inform critical decisions.

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, efficient sentence that directly states the tool's purpose without any fluff. It's front-loaded with the core action and resource, making it easy to parse quickly.

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 lack of annotations and output schema, the description is incomplete for a status-checking tool. It doesn't explain what the status check entails (e.g., returns a boolean, detailed metrics, or error messages), leaving the agent uncertain about the tool's behavior and output format in a context with multiple database-related siblings.

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

Parameters4/5

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

The input schema has 100% description coverage, documenting the single parameter as a dummy for no-parameter tools. The description doesn't add parameter details beyond this, but since the schema fully covers it and the tool effectively has zero functional parameters, a baseline of 4 is appropriate—it's clear no meaningful inputs are needed.

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's purpose with a specific verb ('Check') and resource ('database connection status'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'connect' or 'disconnect', which also relate to database connections.

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 like 'connect' or 'disconnect'. It doesn't mention prerequisites (e.g., whether a connection must already exist) or typical use cases (e.g., verifying connectivity before queries).

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

Related 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/sussa3007/mysql-mcp'

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