Skip to main content
Glama

set_members

Retrieve all members of a set stored in Redis using the specified key. Enables efficient data access and management for sets in Redis databases.

Instructions

获取集合所有成员

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes集合键名

Implementation Reference

  • Handler function that checks Redis connection, calls smembers on the key, and returns the members as JSON text content.
    private async handleSetMembers(args: any) { this.ensureRedisConnection(); const result = await this.redisService!.smembers(args.key); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; }
  • Tool registration including name, description, and input schema requiring a 'key' string.
    { name: 'set_members', description: '获取集合所有成员', inputSchema: { type: 'object', properties: { key: { type: 'string', description: '集合键名' } }, required: ['key'] } },
  • Switch case in CallToolRequest handler that dispatches to the set_members handler.
    case 'set_members': return await this.handleSetMembers(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