zrange
Retrieve a range of members from a Redis sorted set by index. Optionally include their scores.
Instructions
Retrieve a range of members from a Redis sorted set.
Args: key (str): The sorted set key. start (int): The starting index. end (int): The ending index. with_scores (bool, optional): Whether to include scores in the result.
Returns: str: The sorted set members in the given range 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>",
"start": "<start>",
"end": "<end>"
},
"name": "zrange"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| start | Yes | ||
| end | Yes | ||
| with_scores | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |