Skip to main content
Glama

set_members

Retrieve all members from a Redis set by specifying the key. Use this tool to access complete set data for analysis or processing.

Instructions

获取集合所有成员

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes集合键名

Implementation Reference

  • The handler function that executes the 'set_members' tool logic. It ensures Redis connection and calls smembers on the given key to retrieve all set members, returning the result as JSON text.
    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 in the ListTools response, including name, description, and input schema requiring a 'key' string parameter.
    {
      name: 'set_members',
      description: '获取集合所有成员',
      inputSchema: {
        type: 'object',
        properties: {
          key: { type: 'string', description: '集合键名' }
        },
        required: ['key']
      }
    },
  • Dispatch case in the CallToolRequest handler that routes 'set_members' calls to the handleSetMembers method.
    case 'set_members':
      return await this.handleSetMembers(args);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('获取' - get) but doesn't describe what happens if the key doesn't exist, whether it's a read-only operation, potential performance impacts for large sets, or the return format. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient phrase ('获取集合所有成员') that directly states the purpose without unnecessary words. It's appropriately sized and front-loaded, with every word contributing to clarity. No waste or redundancy is present.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (a read operation on a set data structure), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what is returned (e.g., list of members, error handling), behavioral traits, or usage context. For a tool with no structured support, more detail is needed to be fully helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the parameter 'key' documented as '集合键名' (set key name). The description doesn't add any meaning beyond this, such as examples or constraints. According to the rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description, which applies here.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description '获取集合所有成员' (Get all members of a set) clearly states the verb ('获取' - get) and resource ('集合所有成员' - all members of a set). It's specific about retrieving all members rather than a subset. However, it doesn't explicitly distinguish from sibling tools like 'set_add' or 'set_remove', which is why it doesn't reach a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., the set must exist), exclusions (e.g., not for other data types), or compare to siblings like 'key_search' for broader searches. Usage is implied by the purpose but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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