Skip to main content
Glama
farhankaz

Redis MCP Server

by farhankaz

get

Retrieve string values from a Redis database using the Model Context Protocol (MCP). Provide a key to quickly fetch and manage stored data efficiently.

Instructions

Get string value

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesKey to get

Implementation Reference

  • The execute method of GetTool that performs the Redis GET operation on the provided key and returns a ToolResponse.
    async execute(args: unknown, client: RedisClientType): Promise<ToolResponse> {
      if (!this.validateArgs(args)) {
        return this.createErrorResponse('Invalid arguments for get');
      }
    
      try {
        const value = await client.get(args.key);
        if (value === null) {
          return this.createSuccessResponse('Key not found');
        }
        return this.createSuccessResponse(value);
      } catch (error) {
        return this.createErrorResponse(`Failed to get key: ${error}`);
      }
    }
  • Input schema for the 'get' tool defining the required 'key' parameter.
    inputSchema = {
      type: 'object',
      properties: {
        key: { type: 'string', description: 'Key to get' }
      },
      required: ['key']
    };
  • TypeScript interface defining arguments for the 'get' tool.
    export interface GetArgs {
      key: string;
    }
  • Instantiation and registration of GetTool in the default tools array of ToolRegistry.
    new SetTool(),
    new GetTool(),
  • Import of GetTool for registration.
    import { GetTool } from './get_tool.js';
Behavior1/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. 'Get string value' reveals nothing about error handling (e.g., what happens if key doesn't exist), performance characteristics, side effects, authentication requirements, or rate limits. This leaves the agent with insufficient information to predict the tool's behavior.

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

Conciseness3/5

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

The description is extremely concise at just three words, but this brevity comes at the cost of being under-specified rather than efficiently informative. While front-loaded, it fails to provide necessary context that would help an agent use the tool effectively.

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

Completeness1/5

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

Given the tool's apparent simplicity (1 parameter, no output schema), the description is still inadequate. It doesn't explain what system the key belongs to, what format the returned string might have, or how this tool relates to its many siblings. Without annotations or output schema, the description should provide more complete operational context.

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 single parameter 'key' clearly documented as 'Key to get'. The description adds no additional parameter semantics beyond what the schema already provides. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no parameter information in the description.

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

Purpose2/5

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

The description 'Get string value' is a tautology that essentially restates the tool name 'get' with minimal added meaning. While it specifies 'string value' as the return type, it doesn't clearly identify what resource is being retrieved (e.g., from a key-value store, cache, or database) or distinguish this tool from its many siblings like 'hget', 'hgetall', or 'set'.

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

Usage Guidelines1/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 multiple sibling tools like 'hget' (hash get), 'hgetall' (get all hash fields), 'scan' (iterate keys), and 'set' (store value), there's no indication of when this simple key-based retrieval is appropriate versus more specialized operations.

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