Skip to main content
Glama

list_rpop

Remove and retrieve elements from the right end of a Redis list. Specify the list key and optionally the number of elements to pop for efficient data management.

Instructions

右侧弹出列表

Input Schema

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

Implementation Reference

  • The main handler function for the 'list_rpop' tool. It ensures Redis connection, calls rpop on the RedisService with key and optional count, and returns the result as text content.
    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) } ] }; }
  • Input schema definition for the 'list_rpop' tool, specifying the required 'key' and optional 'count' parameters.
    { name: 'list_rpop', description: '右侧弹出列表', inputSchema: { type: 'object', properties: { key: { type: 'string', description: '列表键名' }, count: { type: 'number', description: '弹出数量(可选)' } }, required: ['key'] } },
  • Registration/dispatch point in the CallToolRequestSchema handler switch statement 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