Skip to main content
Glama
farhankaz

Redis MCP Server

by farhankaz

del

Delete a specific key from Redis database using the MCP protocol to manage and maintain data efficiently.

Instructions

Delete a key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesKey to delete

Implementation Reference

  • Handler function that executes the 'del' tool: validates args, calls client.del(key), returns success or error response.
    async execute(args: unknown, client: RedisClientType): Promise<ToolResponse> {
      if (!this.validateArgs(args)) {
        return this.createErrorResponse('Invalid arguments for del');
      }
    
      try {
        const count = await client.del(args.key);
        if (count === 0) {
          return this.createSuccessResponse('Key did not exist');
        }
        return this.createSuccessResponse('Key deleted');
      } catch (error) {
        return this.createErrorResponse(`Failed to delete key: ${error}`);
      }
    }
  • JSON input schema for the 'del' tool defining the required 'key' parameter.
    inputSchema = {
      type: 'object',
      properties: {
        key: { type: 'string', description: 'Key to delete' }
      },
      required: ['key']
    };
  • TypeScript interface DelArgs defining the input arguments for the 'del' tool.
    export interface DelArgs {
      key: string;
    }
  • Instantiation and registration of DelTool instance in the ToolRegistry's default tools array.
    new DelTool(),
  • The registerTool method used to register tools by name in the registry Map.
    registerTool(tool: BaseTool) {
      this.tools.set(tool.name, tool);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. 'Delete' implies a destructive mutation, but it doesn't disclose if deletion is permanent, requires specific permissions, has side effects (e.g., cascading deletions), or rate limits. This leaves significant behavioral gaps for a tool named 'del'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at three words ('Delete a key'), front-loading the core action with zero wasted words. It efficiently communicates the essential purpose without unnecessary elaboration, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's name ('del') suggests a destructive operation, lack of annotations, no output schema, and multiple sibling tools, the description is incomplete. It doesn't clarify the tool's scope (e.g., Redis key deletion), behavioral traits, or differentiation from siblings, leaving too much ambiguity for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the parameter 'key' documented as 'Key to delete' in the schema. The description adds no additional meaning beyond this, such as key format examples or constraints. With high schema coverage, the baseline score of 3 is appropriate as the schema handles the parameter documentation adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Delete a key' states a clear verb ('Delete') and resource ('a key'), making the basic purpose understandable. However, it doesn't specify what type of key (e.g., Redis key, configuration key) or distinguish it from sibling tools like 'zrem' or 'hdel' (if they existed), leaving some ambiguity about the exact scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'zrem' (remove from sorted set) and 'hdel' (delete hash field), it's unclear if 'del' is for general key deletion or specific contexts. No prerequisites, exclusions, or comparative usage hints are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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/farhankaz/redis-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server