Skip to main content
Glama

list_lpop

Remove and return elements from the beginning of a Redis list to process queue items or retrieve stored data in order.

Instructions

左侧弹出列表

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes列表键名
countNo弹出数量(可选)

Implementation Reference

  • Handler function that executes the list_lpop tool: ensures Redis connection and calls redisService.lpop(key, count) to pop elements from the left of the list.
    private async handleListLpop(args: any) {
      this.ensureRedisConnection();
      const result = await this.redisService!.lpop(args.key, args.count);
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2)
          }
        ]
      };
    }
  • Schema definition for the list_lpop tool in the ListTools response, specifying input parameters: key (required), count (optional).
    {
      name: 'list_lpop',
      description: '左侧弹出列表',
      inputSchema: {
        type: 'object',
        properties: {
          key: { type: 'string', description: '列表键名' },
          count: { type: 'number', description: '弹出数量(可选)' }
        },
        required: ['key']
      }
    },
  • Registration in the CallToolRequest handler switch statement that dispatches to the list_lpop handler.
    case 'list_lpop':
      return await this.handleListLpop(args);
Behavior1/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but fails completely. It doesn't indicate that this is a destructive operation (removes elements from the list), what happens when the list is empty, whether it's atomic, or what the return value might be. For a mutation tool with zero annotation coverage, this is critically inadequate.

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 extremely concise at just four Chinese characters. While this represents severe under-specification, it's not verbose or poorly structured—it's front-loaded with the core concept (left pop list) without unnecessary words. Every character earns its place, though that place is minimal.

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

Completeness1/5

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

Given this is a destructive list operation with no annotations, no output schema, and a sparse description, the description is completely inadequate. It doesn't explain what the tool returns, how errors are handled, or the behavioral implications of popping elements. For a tool that modifies data, this level of documentation is insufficient.

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?

Schema description coverage is 100%, with both parameters ('key' and 'count') documented in the schema. The description adds no additional semantic information about parameters beyond what's already in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info 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 '左侧弹出列表' (left pop list) is a tautology that restates the tool name 'list_lpop' in Chinese. It doesn't specify what resource it operates on (Redis lists) or what 'pop' means in this context (removing and returning elements). While it hints at a list operation, it lacks the specificity needed for clear understanding.

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 sibling tools like 'list_rpop' (right pop), 'list_range' (view without removal), or 'list_lpush' (left push), nor does it explain the typical use cases for left-pop operations in Redis (e.g., queue processing).

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