Skip to main content
Glama
redis

Redis MCP Server

Official
by redis

create_vector_index_hash

Set up a Redis 8 vector similarity index using HNSW to perform approximate nearest neighbor search on hash-stored documents with float32 vectors.

Instructions

Create a Redis 8 vector similarity index using HNSW on a Redis hash.

This function sets up a Redis index for approximate nearest neighbor (ANN) search using the HNSW algorithm and float32 vector embeddings.

Args: index_name: The name of the Redis index to create. Unless specifically required, use the default name for the index. prefix: The key prefix used to identify documents to index (e.g., 'doc:'). Unless specifically required, use the default prefix. vector_field: The name of the vector field to be indexed for similarity search. Unless specifically required, use the default field name dim: The dimensionality of the vectors stored under the vector_field. distance_metric: The distance function to use (e.g., 'COSINE', 'L2', 'IP').

Returns: A string indicating whether the index was created successfully or an error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
index_nameNovector_index
prefixNodoc:
vector_fieldNovector
dimNo
distance_metricNoCOSINE

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 fully carries transparency. It lacks disclosure of side effects (e.g., overwrites existing index?), idempotency, error conditions beyond a generic error message, or any destructive behavior. The return type is mentioned but insufficient.

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

Conciseness4/5

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

The description is relatively concise, starting with a clear purpose. The Args list is text-based but structured. Some repetition ('Unless specifically required' for three parameters) adds minor overhead but is instructional.

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?

The description lacks crucial context: prerequisites (e.g., Redis 8, existing data), behavior on re-run, permissions, or relationship with data population tools. An output schema exists, but completeness for a setup tool is insufficient given the complexity.

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?

The Args section in the description adds meaning beyond the input schema's titles and defaults, explaining each parameter's role and providing usage recommendations (e.g., using defaults unless required). Examples are given for distance_metric. Schema coverage is 0%, so description compensates well.

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 explicitly states 'Create a Redis 8 vector similarity index using HNSW on a Redis hash,' providing a specific verb and resource. It distinguishes from sibling tools like vector_search_hash and set_vector_in_hash by clearly indicating index creation.

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?

No explicit guidance on when to use this tool vs alternatives (e.g., before searches, when index doesn't exist). The description advises using default parameter values but does not explain prerequisites or exclusions.

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