Skip to main content
Glama
redis

Redis MCP Server

Official
by redis

hset

Set a field in a Redis hash. Optionally, specify an expiration time in seconds for the key.

Instructions

Set a field in a hash stored at key with an optional expiration time.

Args: name: The Redis hash key. key: The field name inside the hash. value: The value to set. expire_seconds: Optional; time in seconds after which the key should expire.

Returns: A success message or an error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
keyYes
valueYes
expire_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It mentions optional expiration and return type (success/error message), but omits details like key creation if missing, overwrite behavior, idempotency, error conditions (e.g., non-hash key), or size limits. The disclosure is minimal.

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 highly concise: a single-purpose sentence followed by a structured list of arguments. Every sentence adds value, and the format is front-loaded with the primary action. No unnecessary words or repetition.

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

Completeness3/5

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

Given the tool's simplicity and the presence of an output schema (true), the description covers the core action and parameters. However, it lacks usage context (when to choose this over siblings) and deeper behavioral details (error handling, atomicity). For a basic set operation, it is minimally adequate but not comprehensive.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must explain parameters. It clearly defines 'name' as the Redis hash key, 'key' as the field name, 'value' as the value, and 'expire_seconds' as optional TTL. This adds meaning beyond the schema's type-only definitions, though examples or constraints are absent.

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

Purpose5/5

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

The description clearly states the action: 'Set a field in a hash stored at key with an optional expiration time.' It specifies the resource (hash field) and includes a distinguishing feature (optional expiration). Among siblings like hget, hset, and hdel, this uniquely identifies setting a hash field.

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 lacks any guidance on when to use this tool versus alternatives such as set, json_set, or other hash operations. It does not mention prerequisites, side effects, or scenarios to avoid, leaving the agent without decision support.

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

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

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