string_get
Retrieve string values stored in Redis by specifying the key. Facilitates efficient data access for Redis MCP server operations, supporting natural language interactions and secure connections.
Instructions
获取字符串值
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | 键名 |
Implementation Reference
- src/services/mcpService.ts:837-849 (handler)The main handler function for the 'string_get' tool. It checks Redis connection, calls redisService.get(key), and returns the result as MCP content.private async handleStringGet(args: any) { this.ensureRedisConnection(); const result = await this.redisService!.get(args.key); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; }
- src/services/mcpService.ts:115-125 (schema)The tool definition including name, description, and input schema registered in the listTools response.{ name: 'string_get', description: '获取字符串值', inputSchema: { type: 'object', properties: { key: { type: 'string', description: '键名' } }, required: ['key'] } },
- src/services/mcpService.ts:634-635 (registration)The dispatch case in the callTool request handler that routes 'string_get' calls to the handleStringGet method.case 'string_get': return await this.handleStringGet(args);