Skip to main content
Glama

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
NameRequiredDescriptionDefault
keyYes键名

Implementation Reference

  • 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) } ] }; }
  • 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'] } },
  • 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);

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