Skip to main content
Glama

list_range

Retrieve a specified range of elements from a Redis list by providing the key, start index, and stop index.

Instructions

获取列表范围

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes列表键名
startYes起始索引
stopYes结束索引

Implementation Reference

  • Handler function that ensures Redis connection and executes LRANGE command via redisService to retrieve the list range.
    private async handleListRange(args: any) {
      this.ensureRedisConnection();
      const result = await this.redisService!.lrange(args.key, args.start, args.stop);
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2)
          }
        ]
      };
    }
  • Tool schema definition including input validation for key, start, and stop parameters.
    {
      name: 'list_range',
      description: '获取列表范围',
      inputSchema: {
        type: 'object',
        properties: {
          key: { type: 'string', description: '列表键名' },
          start: { type: 'number', description: '起始索引' },
          stop: { type: 'number', description: '结束索引' }
        },
        required: ['key', 'start', 'stop']
      }
    },
  • Dispatch registration in the tool request handler switch statement.
    case 'list_range':
      return await this.handleListRange(args);
Behavior1/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. The description reveals nothing about whether this is a read or write operation, what permissions are required, whether it's destructive, how errors are handled, or what the return format looks like. For a tool with three required parameters and no output schema, this is a critical gap.

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

Conciseness2/5

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

While technically concise (only four Chinese characters), this is a case of under-specification rather than effective brevity. The description is too short to be helpful - it doesn't earn its place by providing necessary context. A single sentence with slightly more detail would be far more valuable than this minimal phrase.

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 that this tool has 3 required parameters, no annotations, and no output schema, the description is completely inadequate. It doesn't explain what the tool returns, what system it operates on (Redis is implied by sibling tools but not stated), or any behavioral characteristics. The agent would need to guess about the tool's purpose and behavior based on minimal information.

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 clear parameter documentation in Chinese ('列表键名', '起始索引', '结束索引'). The description adds no additional meaning beyond what the schema already provides. According to the scoring rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no parameter information in the description.

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

Purpose2/5

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

The description '获取列表范围' (Get list range) is a tautology that essentially restates the tool name 'list_range' in Chinese. It doesn't specify what type of list, what system it operates on, or what 'range' means in this context. While it implies retrieving a subset of a list, it lacks the specificity needed to distinguish this tool from sibling tools like 'list_lpop', 'list_lpush', or 'zset_range'.

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

Usage Guidelines1/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, appropriate contexts, or comparisons to sibling tools like 'list_lpop' (which removes from the left) or 'zset_range' (which operates on sorted sets). Without any usage context, an agent would struggle to select this tool appropriately.

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