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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"key": "<key>",
"fields": "<fields>"
},
"name": "xadd"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| fields | Yes | ||
| expiration | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |