Skip to main content
Glama
egarcia74

Warp SQL Server MCP

by egarcia74

get_connection_health

Check SQL Server connection pool health metrics and diagnose connectivity issues to maintain database reliability and performance.

Instructions

Get connection pool health metrics and diagnostics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Primary handler method for the 'get_connection_health' MCP tool. Retrieves connection health metrics from ConnectionManager and pool stats from PerformanceMonitor, formats as structured JSON response for MCP protocol.
    getConnectionHealth() {
      const poolStats = this.performanceMonitor.getPoolStats();
      const connectionHealth = this.connectionManager.getConnectionHealth
        ? this.connectionManager.getConnectionHealth()
        : { connected: true, status: 'Connected' };
    
      return [
        {
          type: 'text',
          text: JSON.stringify(
            {
              success: true,
              data: {
                connection: connectionHealth,
                pool: poolStats
              }
            },
            null,
            2
          )
        }
      ];
    }
  • Tool registration in the central tool registry. Defines the tool name, description, and empty input schema. Included in PERFORMANCE_TOOLS array and exported via getAllTools() for MCP list_tools requests.
    {
      name: 'get_connection_health',
      description: 'Get connection pool health metrics and diagnostics',
      inputSchema: { type: 'object', properties: {} }
    }
  • Core helper function providing detailed connection pool health metrics: connection status, pool statistics (size, available, pending, borrowed), and optional SSL information.
    getConnectionHealth() {
      if (!this.pool) {
        return {
          connected: false,
          status: 'No connection pool'
        };
      }
    
      const health = {
        connected: this.pool.connected,
        connecting: this.pool.connecting,
        healthy: this.pool.healthy,
        status: this.pool.connected ? 'Connected' : 'Disconnected',
        pool: {
          size: this.pool.size,
          available: this.pool.available,
          pending: this.pool.pending,
          borrowed: this.pool.borrowed
        }
      };
    
      // Try to extract SSL/TLS certificate information if encryption is enabled
      if (this.pool.connected && process.env.SQL_SERVER_ENCRYPT === 'true') {
        health.ssl = this._extractSSLInfo();
      }
    
      return health;
    }
  • MCP tool dispatcher switch case that routes 'get_connection_health' tool calls to the main getConnectionHealth() handler method.
    case 'get_connection_health':
      return {
        content: this.getConnectionHealth()
      };
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't describe how it behaves: e.g., whether it returns real-time or historical data, if it requires specific permissions, what format the metrics are in, or if it has any side effects. For a diagnostic tool with zero annotation coverage, this leaves significant gaps in understanding its operation.

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 wasted words. It is front-loaded with the core action ('Get') and resource, making it easy to parse. Every word earns its place by specifying 'connection pool health metrics and diagnostics'.

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?

Given the tool's complexity (diagnostic with no parameters) and lack of annotations and output schema, the description is minimally adequate. It tells what the tool does but doesn't provide enough context for effective use, such as what metrics are returned or how to interpret them. For a health-check tool, more detail on output expectations would be helpful, but it meets a basic threshold.

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 tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to compensate for any parameter gaps, and it appropriately doesn't mention parameters. A baseline of 4 is applied since no parameter information is required, and the description doesn't mislead about inputs.

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 ('Get') and resource ('connection pool health metrics and diagnostics'). It distinguishes itself from siblings by focusing on connection pool health rather than query performance, table data, or server info. However, it doesn't explicitly differentiate from all siblings like 'get_performance_stats' or 'get_server_info' which might overlap in monitoring domains.

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. With siblings like 'get_performance_stats', 'get_server_info', and 'detect_query_bottlenecks' that might cover related monitoring aspects, there's no indication of when this specific tool is appropriate or what scenarios it targets. Usage is implied only by the name and description.

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

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/egarcia74/warp-sql-server-mcp'

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