get_index_info
Retrieve schema and configuration details for a specific Redis index using FT.INFO command to understand its structure and properties.
Instructions
Retrieve schema and information about a specific Redis index using FT.INFO.
Args: index_name (str): The name of the index to retrieve information about.
Returns: str: Information about the specified index or an error message.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index_name | Yes |
Implementation Reference
- src/tools/redis_query_engine.py:28-43 (handler)The main handler function for the 'get_index_info' tool, decorated with @mcp.tool() for registration. It retrieves detailed information about a Redis search index using FT.INFO and returns it as a formatted JSON string, handling Redis errors gracefully.@mcp.tool() async def get_index_info(index_name: str) -> str: """Retrieve schema and information about a specific Redis index using FT.INFO. Args: index_name (str): The name of the index to retrieve information about. Returns: str: Information about the specified index or an error message. """ try: r = RedisConnectionManager.get_connection() info = r.ft(index_name).info() return json.dumps(info, ensure_ascii=False, indent=2) except RedisError as e: return f"Error retrieving index info: {str(e)}"