Skip to main content
Glama

zset_remove

Remove specific members from a sorted set in Redis using a specified key. Supports single or multiple member deletion for efficient data management within the Redis MCP server.

Instructions

移除有序集合成员

Input Schema

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

Implementation Reference

  • The main execution handler for the 'zset_remove' MCP tool. Ensures Redis connection, removes specified members from the sorted set using the Redis service's zrem method, and returns the result count in MCP content format.
    private async handleZsetRemove(args: any) { this.ensureRedisConnection(); const result = await this.redisService!.zrem(args.key, args.members); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; }
  • The input schema and metadata registration for the 'zset_remove' tool in the ListTools response.
    { name: 'zset_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 CallToolRequest handler switch statement that routes 'zset_remove' calls to its handler function.
    case 'zset_remove': return await this.handleZsetRemove(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