xadd
Add an entry to a Redis stream using key and fields, with optional expiration in seconds.
Instructions
Add an entry to a Redis stream with an optional expiration time.
Args: key (str): The stream key. fields (dict): The fields and values for the stream entry. expiration (int, optional): Expiration time in seconds.
Returns: str: The ID of the added entry or an error message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| fields | Yes | ||
| expiration | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |