We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a0a5d3 commit ee351b2Copy full SHA for ee351b2
src/tools/redis_query_engine.py
@@ -1,3 +1,4 @@
1
+import json
2
from common.connection import RedisConnectionManager
3
from redis.exceptions import RedisError
4
from common.server import mcp
@@ -10,10 +11,13 @@
10
11
@mcp.tool()
12
async def get_indexes() -> str:
13
"""List of indexes in the Redis database
14
+
15
+ Returns:
16
+ str: A JSON string containing the list of indexes or an error message.
17
"""
18
try:
19
r = RedisConnectionManager.get_connection()
- return r.execute_command("FT._LIST")
20
+ return json.dumps(r.execute_command("FT._LIST"))
21
except RedisError as e:
22
return f"Error retrieving indexes: {str(e)}"
23
0 commit comments