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);

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