get_server_info
Retrieve configuration, status, and logging details for the Warp SQL Server MCP server to monitor and manage secure database operations.
Instructions
Get MCP server configuration, status, and logging information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| include_logs | No | Include recent log entries (optional, defaults to false) |
Implementation Reference
- index.js:722-820 (handler)The primary handler function that collects comprehensive server status, configuration details, performance metrics, runtime information, and optional logging details, then formats and returns it as JSON.getServerInfo(includeLogs = false) { const connectionSummary = this.config.getConnectionSummary(); const performanceStats = this.performanceMonitor.getStats(); const connectionHealth = this.getConnectionHealth(); const serverInfo = { server: { name: 'warp-sql-server-mcp', version: VERSION, status: 'Running', uptime: process.uptime(), nodeVersion: process.version, platform: process.platform }, configuration: { connection: { server: connectionSummary.server, database: connectionSummary.database, authType: connectionSummary.authType, encrypt: connectionSummary.encrypt, trustCert: connectionSummary.trustCert, pool: `${connectionSummary.poolMin}-${connectionSummary.poolMax} connections` }, security: { readOnlyMode: this.readOnlyMode, allowDestructiveOperations: this.allowDestructiveOperations, allowSchemaChanges: this.allowSchemaChanges, securityLevel: this.readOnlyMode ? 'MAXIMUM (Read-Only)' : this.allowSchemaChanges ? 'MINIMAL (Full Access)' : this.allowDestructiveOperations ? 'MEDIUM (DML Allowed)' : 'HIGH (DDL Blocked)' }, performance: { enabled: this.config.performanceMonitoring.enabled, slowQueryThreshold: `${this.config.performanceMonitoring.slowQueryThreshold}ms`, maxMetricsHistory: this.config.performanceMonitoring.maxMetricsHistory, samplingRate: `${this.config.performanceMonitoring.samplingRate * 100}%` }, logging: { level: this.logger.config.level, securityAudit: this.logger.config.enableSecurityAudit, responseFormat: this.config.logging.responseFormat, logFile: this.logger.config.logFile || 'Not configured (console only)', securityLogFile: this.logger.config.securityLogFile || 'Not configured (console only)' }, streaming: { enabled: this.config.streaming.enabled, batchSize: this.config.streaming.batchSize, maxMemoryMB: this.config.streaming.maxMemoryMB, maxResponseSizeMB: Math.round(this.config.streaming.maxResponseSize / 1048576) } }, runtime: { performance: performanceStats, connection: connectionHealth, environment: { nodeEnv: process.env.NODE_ENV || 'production', memoryUsage: process.memoryUsage(), pid: process.pid } } }; if (includeLogs) { // Add detailed logging information including file paths serverInfo.logging = { note: "MCP server logs provide detailed insights into the system's operations and security events.", level: this.logger.config.level, securityAudit: this.logger.config.enableSecurityAudit ? 'Enabled' : 'Disabled', logLocation: 'stdout/stderr (captured by Warp)', structuredLogging: 'Winston-based with timestamps and metadata', mainLogFile: this.logger.config.logFile, securityLogFile: this.logger.config.securityLogFile, developmentMode: process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test', outputTargets: { console: 'stdout/stderr (captured by Warp)', fileLogging: this.logger.config.logFile ? 'Enabled' : 'Console only', structuredLogging: 'Winston-based with timestamps and metadata' } }; } return [ { type: 'text', text: JSON.stringify( { success: true, data: serverInfo }, null, 2 ) } ]; }
- index.js:241-243 (registration)Registers the tool list handler which returns all tools including 'get_server_info' via getAllTools() from the registry.this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: getAllTools() }));
- index.js:348-351 (registration)Switch case in the tool call dispatcher that routes 'get_server_info' calls to the getServerInfo handler method.case 'get_server_info': return { content: this.getServerInfo(args.include_logs) };
- lib/tools/tool-registry.js:234-245 (schema)Defines the tool specification including name, description, and input schema for validation.name: 'get_server_info', description: 'Get MCP server configuration, status, and logging information', inputSchema: { type: 'object', properties: { include_logs: { type: 'boolean', description: 'Include recent log entries (optional, defaults to false)' } } } }