Skip to main content
Glama

hash_del

Remove specified fields from a Redis hash key using this tool. Input the hash key and field(s) to delete, streamlining data management in Redis databases.

Instructions

删除哈希字段

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsYes要删除的字段名或字段名数组
keyYes哈希键名

Implementation Reference

  • The handler function for the 'hash_del' tool. It ensures Redis connection, calls hdel on the Redis service with key and fields, and returns the result as JSON text.
    private async handleHashDel(args: any) { this.ensureRedisConnection(); const result = await this.redisService!.hdel(args.key, args.fields); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; }
  • Input schema definition for the 'hash_del' tool, specifying required parameters 'key' (string) and 'fields' (string or array of strings). Part of the tool registration in listTools.
    name: 'hash_del', description: '删除哈希字段', inputSchema: { type: 'object', properties: { key: { type: 'string', description: '哈希键名' }, fields: { oneOf: [ { type: 'string', description: '字段名' }, { type: 'array', items: { type: 'string' }, description: '字段名数组' } ], description: '要删除的字段名或字段名数组' } }, required: ['key', 'fields'] }
  • Switch case in the MCP tool request handler that routes 'hash_del' calls to the handleHashDel method.
    case 'hash_del': return await this.handleHashDel(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