string_mset
Set multiple Redis key-value pairs simultaneously to optimize database operations and reduce network overhead.
Instructions
批量设置键值
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keyValues | Yes | 键值对数组 |
Implementation Reference
- src/services/mcpService.ts:888-900 (handler)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) } ] }; }
- src/services/mcpService.ts:150-171 (schema)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'] } },
- src/services/mcpService.ts:640-641 (registration)Registration in the tool dispatcher switch statement that maps 'string_mset' to its handler.case 'string_mset': return await this.handleStringMset(args);