Skip to main content
Glama

Redis MCP Server

Official
by redis

create_vector_index_hash

Set up a Redis index for approximate nearest neighbor (ANN) search using the HNSW algorithm and float32 vector embeddings stored in a Redis hash.

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

NameRequiredDescriptionDefault
dimNo
distance_metricNoCOSINE
index_nameNovector_index
prefixNodoc:
vector_fieldNovector

Input Schema (JSON Schema)

{ "properties": { "dim": { "default": 1536, "title": "Dim", "type": "integer" }, "distance_metric": { "default": "COSINE", "title": "Distance Metric", "type": "string" }, "index_name": { "default": "vector_index", "title": "Index Name", "type": "string" }, "prefix": { "default": "doc:", "title": "Prefix", "type": "string" }, "vector_field": { "default": "vector", "title": "Vector Field", "type": "string" } }, "title": "create_vector_index_hashArguments", "type": "object" }

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