Skip to main content
Glama

list_lpush

Insert one or multiple values at the beginning of a Redis list using a specified key. Facilitates efficient data management and organization in Redis databases.

Instructions

左侧推入列表

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes列表键名
valuesYes要推入的值或值数组

Implementation Reference

  • The handler function for the 'list_lpush' tool. Ensures Redis connection, calls redisService.lpush with key and values, and returns the result as JSON text content.
    private async handleListLpush(args: any) { this.ensureRedisConnection(); const result = await this.redisService!.lpush(args.key, args.values); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; }
  • Input schema definition for the 'list_lpush' tool, specifying parameters key (string) and values (string or array of strings).
    name: 'list_lpush', description: '左侧推入列表', inputSchema: { type: 'object', properties: { key: { type: 'string', description: '列表键名' }, values: { oneOf: [ { type: 'string', description: '值' }, { type: 'array', items: { type: 'string' }, description: '值数组' } ], description: '要推入的值或值数组' } }, required: ['key', 'values'] } },
  • Registration in the tool dispatch switch statement, routing 'list_lpush' calls to handleListLpush.
    case 'list_lpush': return await this.handleListLpush(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