Skip to main content
Glama

disconnect_redis

Terminate active connections to Redis servers to manage resources, ensure security, or reset sessions. Use this tool to disconnect from Redis MCP server instances effectively.

Instructions

断开与 Redis 服务器的连接

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'disconnect_redis' tool. It checks if connected, calls redisService.disconnect(), nullifies services, and returns formatted response.
    private async handleDisconnectRedis() { if (!this.redisService) { return { content: [ { type: 'text', text: JSON.stringify({ success: false, error: 'Not connected to Redis' }, null, 2) } ] }; } const result = await this.redisService.disconnect(); this.redisService = null; this.backupService = null; return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; }
  • Tool schema definition in the ListTools response, specifying name, description, and empty input schema (no parameters required).
    { name: 'disconnect_redis', description: '断开与 Redis 服务器的连接', inputSchema: { type: 'object', properties: {} } },
  • Registration and dispatch in the CallToolRequestSchema switch statement, routing calls to the handler.
    case 'disconnect_redis': return await this.handleDisconnectRedis();

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/pickstar-2002/redis-mcp'

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