Skip to main content
Glama

string_mget

Retrieve multiple key values in a single operation to efficiently access Redis database entries, reducing query overhead and optimizing performance for bulk data handling.

Instructions

批量获取键值

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keysYes键名数组

Implementation Reference

  • The handler function for the 'string_mget' tool. Ensures Redis connection, calls mget on RedisService with the array of keys, and returns the result as JSON text content.
    private async handleStringMget(args: any) { this.ensureRedisConnection(); const result = await this.redisService!.mget(args.keys); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; }
  • Input schema definition for the string_mget tool: requires an object with a 'keys' array of strings.
    inputSchema: { type: 'object', properties: { keys: { type: 'array', items: { type: 'string' }, description: '键名数组' } }, required: ['keys'] }
  • Registration of the string_mget tool in the ListTools response, including name, description, and input schema.
    { name: 'string_mget', description: '批量获取键值', inputSchema: { type: 'object', properties: { keys: { type: 'array', items: { type: 'string' }, description: '键名数组' } }, required: ['keys'] } },
  • Dispatcher case in the CallToolRequestSchema handler that routes 'string_mget' calls to the specific handler.
    case 'string_mget': return await this.handleStringMget(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