Skip to main content
Glama

string_mset

Set multiple Redis key-value pairs simultaneously to optimize database operations and reduce network overhead.

Instructions

批量设置键值

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyValuesYes键值对数组

Implementation Reference

  • Handler function that executes the string_mset tool by calling RedisService.mset on the array of key-value pairs.
    private async handleStringMset(args: any) { this.ensureRedisConnection(); const result = await this.redisService!.mset(args.keyValues); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; }
  • Input schema for the string_mset tool defining the expected keyValues array structure.
    { name: 'string_mset', description: '批量设置键值', inputSchema: { type: 'object', properties: { keyValues: { type: 'array', items: { type: 'object', properties: { key: { type: 'string', description: '键名' }, value: { type: 'string', description: '值' } }, required: ['key', 'value'] }, description: '键值对数组' } }, required: ['keyValues'] } },
  • Registration in the tool dispatcher switch statement that maps 'string_mset' to its handler.
    case 'string_mset': return await this.handleStringMset(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