Skip to main content
Glama

set_remove

Remove specified members from a Redis set using a key. The tool supports both single and multiple member removal for efficient set management in Redis databases.

Instructions

移除集合成员

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes集合键名
membersYes要移除的成员或成员数组

Implementation Reference

  • Handler function that implements the set_remove tool by calling Redis SREM to remove members from a set and returning the number of removed members.
    private async handleSetRemove(args: any) { this.ensureRedisConnection(); const result = await this.redisService!.srem(args.key, args.members); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; }
  • Input schema definition for the set_remove tool, specifying key and members (string or array) as required parameters.
    { name: 'set_remove', description: '移除集合成员', inputSchema: { type: 'object', properties: { key: { type: 'string', description: '集合键名' }, members: { oneOf: [ { type: 'string', description: '成员' }, { type: 'array', items: { type: 'string' }, description: '成员数组' } ], description: '要移除的成员或成员数组' } }, required: ['key', 'members'] }
  • Dispatch registration in the CallToolRequestSchema handler that routes 'set_remove' calls to the handleSetRemove method.
    case 'set_remove': return await this.handleSetRemove(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