Skip to content

Commit 57320b5

Browse files
committed
Fix json_set value argument type
1 parent 9e3c9b7 commit 57320b5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/tools/json.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
from common.connection import RedisConnectionManager
22
from redis.exceptions import RedisError
33
from common.server import mcp
4+
from typing import Any, Dict, List, Union
5+
6+
JsonType = Union[str, int, float, bool, None, Dict[str, Any], List[Any]]
47

58

69
@mcp.tool()
7-
async def json_set(name: str, path: str, value: str, expire_seconds: int = None) -> str:
10+
async def json_set(name: str, path: str, value: JsonType, expire_seconds: int = None) -> str:
811
"""Set a JSON value in Redis at a given path with an optional expiration time.
912
1013
Args:

0 commit comments

Comments
 (0)