Skip to main content
Glama

hash_getall

Retrieve all fields and values associated with a specific hash key in Redis, enabling comprehensive data access and management for streamlined database operations.

Instructions

获取所有哈希字段

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes哈希键名

Implementation Reference

  • The main handler function for the 'hash_getall' tool. It ensures Redis connection, calls hgetall on the key, and returns the result as JSON text content.
    private async handleHashGetall(args: any) { this.ensureRedisConnection(); const result = await this.redisService!.hgetall(args.key); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; }
  • The tool schema definition including name, description, and input schema requiring a 'key' string.
    { name: 'hash_getall', description: '获取所有哈希字段', inputSchema: { type: 'object', properties: { key: { type: 'string', description: '哈希键名' } }, required: ['key'] } },
  • The switch case registration in the CallToolRequestSchema handler that dispatches to the specific handler method.
    case 'hash_getall': return await this.handleHashGetall(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