zadd
Add a member with a score to a Redis sorted set, optionally setting an expiration time in seconds.
Instructions
Add a member to a Redis sorted set with an optional expiration time.
Args: key (str): The sorted set key. score (float): The score of the member. member (str): The member to add. expiration (int, optional): Expiration time in seconds.
Returns: str: Confirmation message or an error message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| score | Yes | ||
| member | Yes | ||
| expiration | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |