Skip to main content
Glama

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

NameRequiredDescriptionDefault
random_stringYesDummy parameter for no-parameter tools

Input Schema (JSON Schema)

{ "properties": { "random_string": { "description": "Dummy parameter for no-parameter tools", "type": "string" } }, "required": [ "random_string" ], "type": "object" }

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"] } },

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