Skip to main content
Glama

list_rpop

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

Instructions

右侧弹出列表

Input Schema

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

Implementation Reference

  • The MCP tool handler for 'list_rpop' that ensures Redis connection and calls rpop on the RedisService with key and optional count.
    private async handleListRpop(args: any) {
      this.ensureRedisConnection();
      const result = await this.redisService!.rpop(args.key, args.count);
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2)
          }
        ]
      };
    }
  • Registration of the 'list_rpop' tool in the ListTools response, including name, description, and input schema.
    {
      name: 'list_rpop',
      description: '右侧弹出列表',
      inputSchema: {
        type: 'object',
        properties: {
          key: { type: 'string', description: '列表键名' },
          count: { type: 'number', description: '弹出数量(可选)' }
        },
        required: ['key']
      }
    },
  • Dispatcher case in CallToolRequestSchema handler that routes 'list_rpop' calls to the handleListRpop method.
    case 'list_rpop':
      return await this.handleListRpop(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