Redis MCP Server for Cloudflare Workers - Upstash REST API
180 tools available in the Redis MCP server. Each tool can be called by AI assistants to perform specific actions.
redis_randomkeyReturn a random key from the database.
{
"type": "object",
"properties": {}
}redis_msetnxSet multiple keys to multiple values, only if none of the keys exist.
{
"type": "object",
"required": [
"keyValues"
],
"properties": {
"keyValues": {
"type": "object",
"description": "Object of key-value pairs to set"
}
}
}redis_sremRemove one or more members from a set.
{
"type": "object",
"required": [
"key",
"members"
],
"properties": {
"key": {
"type": "string",
"description": "The set key"
},
"members": {
"type": "array",
"items": {
"type": "string"
},
"description": "Members to remove"
}
}
}redis_smembersGet all members in a set.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The set key"
}
}
}redis_scardGet the number of members in a set.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The set key"
}
}
}redis_sismemberCheck if a member exists in a set.
{
"type": "object",
"required": [
"key",
"member"
],
"properties": {
"key": {
"type": "string",
"description": "The set key"
},
"member": {
"type": "string",
"description": "The member to check"
}
}
}redis_zrevrankGet the rank (position) of a member in a sorted set (highest score = 0).
{
"type": "object",
"required": [
"key",
"member"
],
"properties": {
"key": {
"type": "string",
"description": "The sorted set key"
},
"member": {
"type": "string",
"description": "The member"
}
}
}redis_json_objkeysGet the keys of a JSON object.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"path": {
"type": "string",
"description": "JSONPath expression"
}
}
}redis_json_objlenGet the number of keys in a JSON object.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"path": {
"type": "string",
"description": "JSONPath expression"
}
}
}redis_hdelDelete one or more hash fields.
{
"type": "object",
"required": [
"key",
"fields"
],
"properties": {
"key": {
"type": "string",
"description": "The hash key"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of fields to delete"
}
}
}redis_json_numincrbyIncrement a JSON number value.
{
"type": "object",
"required": [
"key",
"path",
"increment"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"path": {
"type": "string",
"description": "JSONPath expression"
},
"increment": {
"type": "number",
"description": "Amount to increment by"
}
}
}redis_hexistsCheck if a hash field exists.
{
"type": "object",
"required": [
"key",
"field"
],
"properties": {
"key": {
"type": "string",
"description": "The hash key"
},
"field": {
"type": "string",
"description": "The field to check"
}
}
}redis_hkeysGet all field names in a hash.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The hash key"
}
}
}redis_hvalsGet all values in a hash.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The hash key"
}
}
}redis_hlenGet the number of fields in a hash.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The hash key"
}
}
}redis_getbitGet the bit value at offset in the string value stored at key.
{
"type": "object",
"required": [
"key",
"offset"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"offset": {
"type": "integer",
"minimum": 0,
"description": "Bit offset"
}
}
}redis_hincrbyfloatIncrement the floating point value of a hash field by the given amount.
{
"type": "object",
"required": [
"key",
"field",
"increment"
],
"properties": {
"key": {
"type": "string",
"description": "The hash key"
},
"field": {
"type": "string",
"description": "The field to increment"
},
"increment": {
"type": "number",
"description": "The amount to increment by"
}
}
}redis_hstrlenGet the length of the value of a hash field.
{
"type": "object",
"required": [
"key",
"field"
],
"properties": {
"key": {
"type": "string",
"description": "The hash key"
},
"field": {
"type": "string",
"description": "The field"
}
}
}redis_hincrbyIncrement the integer value of a hash field by the given amount.
{
"type": "object",
"required": [
"key",
"field",
"increment"
],
"properties": {
"key": {
"type": "string",
"description": "The hash key"
},
"field": {
"type": "string",
"description": "The field to increment"
},
"increment": {
"type": "integer",
"description": "The amount to increment by"
}
}
}redis_hmsetSet multiple hash fields to multiple values (deprecated, use HSET).
{
"type": "object",
"required": [
"key",
"fieldValues"
],
"properties": {
"key": {
"type": "string",
"description": "The hash key"
},
"fieldValues": {
"type": "object",
"description": "Object of field-value pairs to set"
}
}
}redis_hmgetGet the values of multiple hash fields.
{
"type": "object",
"required": [
"key",
"fields"
],
"properties": {
"key": {
"type": "string",
"description": "The hash key"
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of fields to get"
}
}
}redis_hgetallGet all fields and values in a hash.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The hash key"
}
}
}redis_setbitSet or clear the bit at offset in the string value stored at key.
{
"type": "object",
"required": [
"key",
"offset",
"value"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"value": {
"type": "string",
"description": "Bit value (0 or 1)"
},
"offset": {
"type": "integer",
"minimum": 0,
"description": "Bit offset"
}
}
}redis_bitcountCount the number of set bits (population counting) in a string.
{
"type": "object",
"required": [
"key"
],
"properties": {
"end": {
"type": "integer",
"description": "End byte/bit position"
},
"key": {
"type": "string",
"description": "The key"
},
"mode": {
"enum": [
"BYTE",
"BIT"
],
"type": "string",
"description": "Whether start/end refer to bytes or bits"
},
"start": {
"type": "integer",
"description": "Start byte/bit position"
}
}
}redis_bitposFind the position of the first bit set to 0 or 1 in a string.
{
"type": "object",
"required": [
"key",
"bit"
],
"properties": {
"bit": {
"type": "string",
"description": "Bit value to find (0 or 1)"
},
"end": {
"type": "integer",
"description": "End byte/bit position"
},
"key": {
"type": "string",
"description": "The key"
},
"mode": {
"enum": [
"BYTE",
"BIT"
],
"type": "string",
"description": "Whether start/end refer to bytes or bits"
},
"start": {
"type": "integer",
"description": "Start byte/bit position"
}
}
}redis_bitopPerform bitwise operations between strings.
{
"type": "object",
"required": [
"operation",
"destKey",
"keys"
],
"properties": {
"keys": {
"type": "array",
"items": {
"type": "string"
},
"description": "Source keys (NOT only takes one key)"
},
"destKey": {
"type": "string",
"description": "Destination key"
},
"operation": {
"enum": [
"AND",
"OR",
"XOR",
"NOT"
],
"type": "string",
"description": "Bitwise operation"
}
}
}redis_geoaddAdd geospatial items (longitude, latitude, name) to a sorted set.
{
"type": "object",
"required": [
"key"
],
"properties": {
"ch": {
"type": "boolean",
"description": "Return number of elements changed"
},
"nx": {
"type": "boolean",
"description": "Only add new elements"
},
"xx": {
"type": "boolean",
"description": "Only update existing elements"
},
"key": {
"type": "string",
"description": "The geo key"
}
}
}redis_geodistGet the distance between two members in a geospatial index.
{
"type": "object",
"required": [
"key",
"member1",
"member2"
],
"properties": {
"key": {
"type": "string",
"description": "The geo key"
},
"unit": {
"enum": [
"M",
"KM",
"FT",
"MI"
],
"type": "string",
"description": "Distance unit (default: M)"
},
"member1": {
"type": "string",
"description": "First member"
},
"member2": {
"type": "string",
"description": "Second member"
}
}
}redis_geohashGet the geohash strings of members in a geospatial index.
{
"type": "object",
"required": [
"key",
"members"
],
"properties": {
"key": {
"type": "string",
"description": "The geo key"
},
"members": {
"type": "array",
"items": {
"type": "string"
},
"description": "Members to get geohashes for"
}
}
}redis_geoposGet the positions (longitude, latitude) of members in a geospatial index.
{
"type": "object",
"required": [
"key",
"members"
],
"properties": {
"key": {
"type": "string",
"description": "The geo key"
},
"members": {
"type": "array",
"items": {
"type": "string"
},
"description": "Members to get positions for"
}
}
}redis_geosearchSearch for members within a geographic area.
{
"type": "object",
"required": [
"key"
],
"properties": {
"any": {
"type": "boolean",
"description": "Return any N items (used with count)"
},
"asc": {
"type": "boolean",
"description": "Sort results ascending (nearest first)"
},
"key": {
"type": "string",
"description": "The geo key"
},
"desc": {
"type": "boolean",
"description": "Sort results descending (farthest first)"
},
"count": {
"type": "integer",
"description": "Limit number of results"
},
"withdist": {
"type": "boolean",
"description": "Include distance in results"
},
"withhash": {
"type": "boolean",
"description": "Include geohash in results"
},
"withcoord": {
"type": "boolean",
"description": "Include coordinates in results"
},
"frommember": {
"type": "string",
"description": "Search from this member"
}
}
}redis_geosearchstoreSearch for members within a geographic area and store the results.
{
"type": "object",
"required": [
"destination",
"source"
],
"properties": {
"any": {
"type": "boolean",
"description": "Return any N items"
},
"asc": {
"type": "boolean",
"description": "Sort results ascending"
},
"desc": {
"type": "boolean",
"description": "Sort results descending"
},
"count": {
"type": "integer",
"description": "Limit number of results"
},
"source": {
"type": "string",
"description": "Source geo key"
},
"storedist": {
"type": "boolean",
"description": "Store distances instead of geohashes"
},
"frommember": {
"type": "string",
"description": "Search from this member"
},
"destination": {
"type": "string",
"description": "Destination key"
}
}
}redis_hgetGet the value of a hash field.
{
"type": "object",
"required": [
"key",
"field"
],
"properties": {
"key": {
"type": "string",
"description": "The hash key"
},
"field": {
"type": "string",
"description": "The field to get"
}
}
}redis_hsetSet one or more hash fields to their values.
{
"type": "object",
"required": [
"key",
"fieldValues"
],
"properties": {
"key": {
"type": "string",
"description": "The hash key"
},
"fieldValues": {
"type": "object",
"description": "Object of field-value pairs to set"
}
}
}redis_hsetnxSet the value of a hash field only if it does not exist.
{
"type": "object",
"required": [
"key",
"field",
"value"
],
"properties": {
"key": {
"type": "string",
"description": "The hash key"
},
"field": {
"type": "string",
"description": "The field to set"
},
"value": {
"type": "string",
"description": "The value to set"
}
}
}redis_hscanIncrementally iterate over hash fields and values.
{
"type": "object",
"required": [
"key",
"cursor"
],
"properties": {
"key": {
"type": "string",
"description": "The hash key"
},
"count": {
"type": "integer",
"description": "Hint for number of elements to return"
},
"match": {
"type": "string",
"description": "Pattern to match fields"
},
"cursor": {
"type": "integer",
"minimum": 0,
"description": "Cursor position (start with 0)"
}
}
}redis_hrandfieldGet one or more random fields from a hash.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The hash key"
},
"count": {
"type": "integer",
"description": "Number of fields to return (negative allows duplicates)"
},
"withValues": {
"type": "boolean",
"description": "Also return the values"
}
}
}redis_pfaddAdd elements to a HyperLogLog data structure.
{
"type": "object",
"required": [
"key",
"elements"
],
"properties": {
"key": {
"type": "string",
"description": "The HyperLogLog key"
},
"elements": {
"type": "array",
"items": {
"type": "string"
},
"description": "Elements to add"
}
}
}redis_pfcountGet the approximated cardinality (unique elements) of a HyperLogLog.
{
"type": "object",
"required": [
"keys"
],
"properties": {
"keys": {
"type": "array",
"items": {
"type": "string"
},
"description": "HyperLogLog keys"
}
}
}redis_pfmergeMerge multiple HyperLogLog values into a single one.
{
"type": "object",
"required": [
"destKey",
"sourceKeys"
],
"properties": {
"destKey": {
"type": "string",
"description": "Destination HyperLogLog key"
},
"sourceKeys": {
"type": "array",
"items": {
"type": "string"
},
"description": "Source HyperLogLog keys"
}
}
}redis_json_setSet a JSON value at a path.
{
"type": "object",
"required": [
"key",
"path",
"value"
],
"properties": {
"nx": {
"type": "boolean",
"description": "Only set if path does not exist"
},
"xx": {
"type": "boolean",
"description": "Only set if path exists"
},
"key": {
"type": "string",
"description": "The key"
},
"path": {
"type": "string",
"description": "JSONPath expression ($ for root)"
},
"value": {
"description": "The JSON value to set"
}
}
}redis_json_getGet the JSON value at one or more paths.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"paths": {
"type": "array",
"items": {
"type": "string"
},
"description": "JSONPath expressions (default: $)"
}
}
}redis_json_mgetGet a JSON value from multiple keys at a path.
{
"type": "object",
"required": [
"keys",
"path"
],
"properties": {
"keys": {
"type": "array",
"items": {
"type": "string"
},
"description": "The keys"
},
"path": {
"type": "string",
"description": "JSONPath expression"
}
}
}redis_json_delDelete a JSON value at a path.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"path": {
"type": "string",
"description": "JSONPath expression (default: $)"
}
}
}redis_json_typeGet the type of a JSON value at a path.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"path": {
"type": "string",
"description": "JSONPath expression"
}
}
}redis_json_strlenGet the length of a JSON string value.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"path": {
"type": "string",
"description": "JSONPath expression"
}
}
}redis_json_strappendAppend a string to a JSON string value.
{
"type": "object",
"required": [
"key",
"value"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"path": {
"type": "string",
"description": "JSONPath expression"
},
"value": {
"type": "string",
"description": "String to append"
}
}
}redis_json_arrlenGet the length of a JSON array.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"path": {
"type": "string",
"description": "JSONPath expression"
}
}
}redis_json_arrindexFind the index of a value in a JSON array.
{
"type": "object",
"required": [
"key",
"path",
"value"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"path": {
"type": "string",
"description": "JSONPath expression"
},
"stop": {
"type": "integer",
"description": "Stop index"
},
"start": {
"type": "integer",
"description": "Start index"
},
"value": {
"description": "Value to find"
}
}
}redis_json_arrinsertInsert values into a JSON array at a given index.
{
"type": "object",
"required": [
"key",
"path",
"index",
"values"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"path": {
"type": "string",
"description": "JSONPath expression"
},
"index": {
"type": "integer",
"description": "Index to insert at"
},
"values": {
"type": "array",
"items": {
"type": "string"
},
"description": "Values to insert"
}
}
}redis_json_arrappendAppend values to a JSON array.
{
"type": "object",
"required": [
"key",
"path",
"values"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"path": {
"type": "string",
"description": "JSONPath expression"
},
"values": {
"type": "array",
"items": {
"type": "string"
},
"description": "Values to append"
}
}
}redis_json_arrpopPop an element from a JSON array.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"path": {
"type": "string",
"description": "JSONPath expression"
},
"index": {
"type": "integer",
"description": "Index to pop (default: -1, last element)"
}
}
}redis_json_arrtrimTrim a JSON array to a specified range.
{
"type": "object",
"required": [
"key",
"path",
"start",
"stop"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"path": {
"type": "string",
"description": "JSONPath expression"
},
"stop": {
"type": "integer",
"description": "Stop index (inclusive)"
},
"start": {
"type": "integer",
"description": "Start index"
}
}
}redis_json_nummultbyMultiply a JSON number value.
{
"type": "object",
"required": [
"key",
"path",
"multiplier"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"path": {
"type": "string",
"description": "JSONPath expression"
},
"multiplier": {
"type": "number",
"description": "Multiplier"
}
}
}redis_json_toggleToggle a JSON boolean value.
{
"type": "object",
"required": [
"key",
"path"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"path": {
"type": "string",
"description": "JSONPath expression"
}
}
}redis_json_clearClear all values in a JSON array or object.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"path": {
"type": "string",
"description": "JSONPath expression"
}
}
}redis_json_mergeMerge a JSON value into the document at a path.
{
"type": "object",
"required": [
"key",
"path",
"value"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"path": {
"type": "string",
"description": "JSONPath expression"
},
"value": {
"description": "JSON value to merge"
}
}
}redis_delDelete one or more keys.
{
"type": "object",
"required": [
"keys"
],
"properties": {
"keys": {
"type": "array",
"items": {
"type": "string"
},
"description": "Keys to delete"
}
}
}redis_unlinkDelete one or more keys asynchronously (non-blocking).
{
"type": "object",
"required": [
"keys"
],
"properties": {
"keys": {
"type": "array",
"items": {
"type": "string"
},
"description": "Keys to delete"
}
}
}redis_existsCheck if one or more keys exist. Returns the count of existing keys.
{
"type": "object",
"required": [
"keys"
],
"properties": {
"keys": {
"type": "array",
"items": {
"type": "string"
},
"description": "Keys to check"
}
}
}redis_expireSet a timeout on a key (in seconds). After the timeout, the key will be deleted.
{
"type": "object",
"required": [
"key",
"seconds"
],
"properties": {
"gt": {
"type": "boolean",
"description": "Only set if new expiry > current expiry"
},
"lt": {
"type": "boolean",
"description": "Only set if new expiry < current expiry"
},
"nx": {
"type": "boolean",
"description": "Only set if key has no expiry"
},
"xx": {
"type": "boolean",
"description": "Only set if key has an expiry"
},
"key": {
"type": "string",
"description": "The key"
},
"seconds": {
"type": "integer",
"description": "Expiration time in seconds"
}
}
}redis_expireatSet the expiration of a key to a Unix timestamp (in seconds).
{
"type": "object",
"required": [
"key",
"timestamp"
],
"properties": {
"gt": {
"type": "boolean",
"description": "Only set if new expiry > current expiry"
},
"lt": {
"type": "boolean",
"description": "Only set if new expiry < current expiry"
},
"nx": {
"type": "boolean",
"description": "Only set if key has no expiry"
},
"xx": {
"type": "boolean",
"description": "Only set if key has an expiry"
},
"key": {
"type": "string",
"description": "The key"
},
"timestamp": {
"type": "integer",
"description": "Unix timestamp in seconds"
}
}
}redis_pexpireSet a timeout on a key (in milliseconds).
{
"type": "object",
"required": [
"key",
"milliseconds"
],
"properties": {
"gt": {
"type": "boolean",
"description": "Only set if new expiry > current expiry"
},
"lt": {
"type": "boolean",
"description": "Only set if new expiry < current expiry"
},
"nx": {
"type": "boolean",
"description": "Only set if key has no expiry"
},
"xx": {
"type": "boolean",
"description": "Only set if key has an expiry"
},
"key": {
"type": "string",
"description": "The key"
},
"milliseconds": {
"type": "integer",
"description": "Expiration time in milliseconds"
}
}
}redis_pexpireatSet the expiration of a key to a Unix timestamp (in milliseconds).
{
"type": "object",
"required": [
"key",
"timestamp"
],
"properties": {
"gt": {
"type": "boolean",
"description": "Only set if new expiry > current expiry"
},
"lt": {
"type": "boolean",
"description": "Only set if new expiry < current expiry"
},
"nx": {
"type": "boolean",
"description": "Only set if key has no expiry"
},
"xx": {
"type": "boolean",
"description": "Only set if key has an expiry"
},
"key": {
"type": "string",
"description": "The key"
},
"timestamp": {
"type": "integer",
"description": "Unix timestamp in milliseconds"
}
}
}redis_ttlGet the time to live for a key in seconds. Returns -1 if no expiry, -2 if key does not exist.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
}
}
}redis_pttlGet the time to live for a key in milliseconds.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
}
}
}redis_expiretimeGet the expiration Unix timestamp of a key in seconds.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
}
}
}redis_pexpiretimeGet the expiration Unix timestamp of a key in milliseconds.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
}
}
}redis_persistRemove the expiration from a key.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
}
}
}redis_keysFind all keys matching a pattern. Warning: may be slow for large databases.
{
"type": "object",
"required": [
"pattern"
],
"properties": {
"pattern": {
"type": "string",
"description": "Pattern to match (e.g., \"user:*\", \"*\", \"foo?bar"
}
}
}redis_saddAdd one or more members to a set.
{
"type": "object",
"required": [
"key",
"members"
],
"properties": {
"key": {
"type": "string",
"description": "The set key"
},
"members": {
"type": "array",
"items": {
"type": "string"
},
"description": "Members to add"
}
}
}redis_scanIncrementally iterate over keys. Safer than KEYS for production.
{
"type": "object",
"required": [
"cursor"
],
"properties": {
"type": {
"type": "string",
"description": "Filter by type (string, list, set, zset, hash, stream)"
},
"count": {
"type": "integer",
"description": "Hint for number of elements to return"
},
"match": {
"type": "string",
"description": "Pattern to match keys"
},
"cursor": {
"type": "integer",
"minimum": 0,
"description": "Cursor position (start with 0)"
}
}
}redis_renameRename a key.
{
"type": "object",
"required": [
"key",
"newKey"
],
"properties": {
"key": {
"type": "string",
"description": "Current key name"
},
"newKey": {
"type": "string",
"description": "New key name"
}
}
}redis_renamenxRename a key only if the new key does not exist.
{
"type": "object",
"required": [
"key",
"newKey"
],
"properties": {
"key": {
"type": "string",
"description": "Current key name"
},
"newKey": {
"type": "string",
"description": "New key name"
}
}
}redis_typeGet the data type of the value stored at a key.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
}
}
}redis_copyCopy the value at a key to another key.
{
"type": "object",
"required": [
"source",
"destination"
],
"properties": {
"source": {
"type": "string",
"description": "Source key"
},
"replace": {
"type": "boolean",
"description": "Replace destination if it exists"
},
"destination": {
"type": "string",
"description": "Destination key"
}
}
}redis_touchAlters the last access time of one or more keys.
{
"type": "object",
"required": [
"keys"
],
"properties": {
"keys": {
"type": "array",
"items": {
"type": "string"
},
"description": "Keys to touch"
}
}
}redis_dumpSerialize the value stored at a key.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
}
}
}redis_restoreCreate a key from a serialized value.
{
"type": "object",
"required": [
"key",
"ttl",
"serializedValue"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"ttl": {
"type": "integer",
"minimum": 0,
"description": "Time to live in milliseconds (0 for no expiry)"
},
"absttl": {
"type": "boolean",
"description": "TTL is an absolute Unix timestamp"
},
"replace": {
"type": "boolean",
"description": "Replace existing key"
},
"serializedValue": {
"type": "string",
"description": "Serialized value from DUMP"
}
}
}redis_objectInspect the internals of Redis Objects.
{
"type": "object",
"required": [
"subcommand",
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"subcommand": {
"enum": [
"ENCODING",
"FREQ",
"IDLETIME",
"REFCOUNT"
],
"type": "string",
"description": "Subcommand"
}
}
}redis_lpushPrepend one or more elements to a list. Creates the list if it does not exist.
{
"type": "object",
"required": [
"key",
"elements"
],
"properties": {
"key": {
"type": "string",
"description": "The list key"
},
"elements": {
"type": "array",
"items": {
"type": "string"
},
"description": "Elements to prepend"
}
}
}redis_rpushAppend one or more elements to a list. Creates the list if it does not exist.
{
"type": "object",
"required": [
"key",
"elements"
],
"properties": {
"key": {
"type": "string",
"description": "The list key"
},
"elements": {
"type": "array",
"items": {
"type": "string"
},
"description": "Elements to append"
}
}
}redis_lpopRemove and return the first element(s) from a list.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The list key"
},
"count": {
"type": "integer",
"description": "Number of elements to pop"
}
}
}redis_rpopRemove and return the last element(s) from a list.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The list key"
},
"count": {
"type": "integer",
"description": "Number of elements to pop"
}
}
}redis_llenGet the length of a list.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The list key"
}
}
}redis_lindexGet an element from a list by its index.
{
"type": "object",
"required": [
"key",
"index"
],
"properties": {
"key": {
"type": "string",
"description": "The list key"
},
"index": {
"type": "integer",
"description": "Index (0-based, negative values count from end)"
}
}
}redis_lrangeGet a range of elements from a list.
{
"type": "object",
"required": [
"key",
"start",
"stop"
],
"properties": {
"key": {
"type": "string",
"description": "The list key"
},
"stop": {
"type": "integer",
"description": "Stop index (inclusive, negative values count from end)"
},
"start": {
"type": "integer",
"description": "Start index (0-based, negative values count from end)"
}
}
}redis_lsetSet the value of an element in a list by its index.
{
"type": "object",
"required": [
"key",
"index",
"element"
],
"properties": {
"key": {
"type": "string",
"description": "The list key"
},
"index": {
"type": "integer",
"description": "Index of the element to set"
},
"element": {
"type": "string",
"description": "The new value"
}
}
}redis_lremRemove elements from a list. Count > 0: remove from head; count < 0: remove from tail; count = 0: remove all.
{
"type": "object",
"required": [
"key",
"count",
"element"
],
"properties": {
"key": {
"type": "string",
"description": "The list key"
},
"count": {
"type": "integer",
"description": "Number of elements to remove"
},
"element": {
"type": "string",
"description": "The element to remove"
}
}
}redis_ltrimTrim a list to the specified range.
{
"type": "object",
"required": [
"key",
"start",
"stop"
],
"properties": {
"key": {
"type": "string",
"description": "The list key"
},
"stop": {
"type": "integer",
"description": "Stop index (inclusive)"
},
"start": {
"type": "integer",
"description": "Start index"
}
}
}redis_linsertInsert an element before or after another element in a list.
{
"type": "object",
"required": [
"key",
"position",
"pivot",
"element"
],
"properties": {
"key": {
"type": "string",
"description": "The list key"
},
"pivot": {
"type": "string",
"description": "The pivot element"
},
"element": {
"type": "string",
"description": "The element to insert"
},
"position": {
"enum": [
"BEFORE",
"AFTER"
],
"type": "string",
"description": "Insert position relative to pivot"
}
}
}redis_lmoveAtomically pop an element from one list and push it to another.
{
"type": "object",
"required": [
"source",
"destination",
"whereFrom",
"whereTo"
],
"properties": {
"source": {
"type": "string",
"description": "Source list key"
},
"whereTo": {
"enum": [
"LEFT",
"RIGHT"
],
"type": "string",
"description": "Which end to push to"
},
"whereFrom": {
"enum": [
"LEFT",
"RIGHT"
],
"type": "string",
"description": "Which end to pop from"
},
"destination": {
"type": "string",
"description": "Destination list key"
}
}
}redis_lposReturn the index of matching elements in a list.
{
"type": "object",
"required": [
"key",
"element"
],
"properties": {
"key": {
"type": "string",
"description": "The list key"
},
"rank": {
"type": "integer",
"description": "Return the Nth matching element (1-based, negative from end)"
},
"count": {
"type": "integer",
"description": "Return positions of multiple matches"
},
"maxlen": {
"type": "integer",
"description": "Limit the search to first N elements"
},
"element": {
"type": "string",
"description": "The element to find"
}
}
}redis_lpushxPrepend elements to a list only if the list exists.
{
"type": "object",
"required": [
"key",
"elements"
],
"properties": {
"key": {
"type": "string",
"description": "The list key"
},
"elements": {
"type": "array",
"items": {
"type": "string"
},
"description": "Elements to prepend"
}
}
}redis_rpushxAppend elements to a list only if the list exists.
{
"type": "object",
"required": [
"key",
"elements"
],
"properties": {
"key": {
"type": "string",
"description": "The list key"
},
"elements": {
"type": "array",
"items": {
"type": "string"
},
"description": "Elements to append"
}
}
}redis_publishPublish a message to a channel.
{
"type": "object",
"required": [
"channel",
"message"
],
"properties": {
"channel": {
"type": "string",
"description": "Channel name"
},
"message": {
"type": "string",
"description": "Message to publish"
}
}
}redis_pubsub_channelsList active channels (channels with at least one subscriber).
{
"type": "object",
"properties": {
"pattern": {
"type": "string",
"description": "Pattern to match channel names"
}
}
}redis_pubsub_numsubGet the number of subscribers for specific channels.
{
"type": "object",
"required": [
"channels"
],
"properties": {
"channels": {
"type": "array",
"items": {
"type": "string"
},
"description": "Channel names"
}
}
}redis_pubsub_numpatGet the number of unique pattern subscriptions.
{
"type": "object",
"properties": {}
}redis_evalExecute a Lua script server-side.
{
"type": "object",
"required": [
"script",
"keys",
"args"
],
"properties": {
"args": {
"type": "array",
"items": {
"type": "string"
},
"description": "Additional arguments to pass to the script"
},
"keys": {
"type": "array",
"items": {
"type": "string"
},
"description": "Keys that the script will access"
},
"script": {
"type": "string",
"description": "Lua script to execute"
}
}
}redis_evalshaExecute a cached Lua script by its SHA1 digest.
{
"type": "object",
"required": [
"sha1",
"keys",
"args"
],
"properties": {
"args": {
"type": "array",
"items": {
"type": "string"
},
"description": "Additional arguments to pass to the script"
},
"keys": {
"type": "array",
"items": {
"type": "string"
},
"description": "Keys that the script will access"
},
"sha1": {
"type": "string",
"description": "SHA1 digest of the script"
}
}
}redis_script_loadLoad a Lua script into the script cache.
{
"type": "object",
"required": [
"script"
],
"properties": {
"script": {
"type": "string",
"description": "Lua script to load"
}
}
}redis_script_existsCheck if scripts exist in the script cache.
{
"type": "object",
"required": [
"sha1s"
],
"properties": {
"sha1s": {
"type": "array",
"items": {
"type": "string"
},
"description": "SHA1 digests to check"
}
}
}redis_script_flushRemove all scripts from the script cache.
{
"type": "object",
"properties": {
"mode": {
"enum": [
"ASYNC",
"SYNC"
],
"type": "string",
"description": "Flush mode"
}
}
}redis_executeExecute any Redis command. Use for commands not covered by other tools.
{
"type": "object",
"required": [
"command"
],
"properties": {
"command": {
"type": "array",
"items": {
"type": "string"
},
"description": "Redis command as array of strings (e.g., [\"GET\", \"mykey\"])"
}
}
}redis_infoGet information and statistics about the server.
{
"type": "object",
"properties": {
"section": {
"type": "string",
"description": "Specific section (server, clients, memory, stats, replication, cpu, keyspace, etc.)"
}
}
}redis_dbsizeGet the number of keys in the currently selected database.
{
"type": "object",
"properties": {}
}redis_flushdbDelete all keys in the current database. Use with caution!
{
"type": "object",
"properties": {
"async": {
"type": "boolean",
"description": "Flush asynchronously"
}
}
}redis_flushallDelete all keys in all databases. Use with extreme caution!
{
"type": "object",
"properties": {
"async": {
"type": "boolean",
"description": "Flush asynchronously"
}
}
}redis_timeGet the current server time.
{
"type": "object",
"properties": {}
}redis_pingTest the connection to the server.
{
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Optional message to echo back"
}
}
}redis_echoEcho the given message back.
{
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string",
"description": "Message to echo"
}
}
}redis_smismemberCheck if multiple members exist in a set.
{
"type": "object",
"required": [
"key",
"members"
],
"properties": {
"key": {
"type": "string",
"description": "The set key"
},
"members": {
"type": "array",
"items": {
"type": "string"
},
"description": "Members to check"
}
}
}redis_spopRemove and return one or more random members from a set.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The set key"
},
"count": {
"type": "integer",
"description": "Number of members to pop"
}
}
}redis_srandmemberGet one or more random members from a set without removing them.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The set key"
},
"count": {
"type": "integer",
"description": "Number of members to return (negative allows duplicates)"
}
}
}redis_smoveMove a member from one set to another.
{
"type": "object",
"required": [
"source",
"destination",
"member"
],
"properties": {
"member": {
"type": "string",
"description": "The member to move"
},
"source": {
"type": "string",
"description": "Source set key"
},
"destination": {
"type": "string",
"description": "Destination set key"
}
}
}redis_sinterGet the intersection of multiple sets.
{
"type": "object",
"required": [
"keys"
],
"properties": {
"keys": {
"type": "array",
"items": {
"type": "string"
},
"description": "Set keys to intersect"
}
}
}redis_sinterstoreStore the intersection of multiple sets in a new set.
{
"type": "object",
"required": [
"destination",
"keys"
],
"properties": {
"keys": {
"type": "array",
"items": {
"type": "string"
},
"description": "Set keys to intersect"
},
"destination": {
"type": "string",
"description": "Destination set key"
}
}
}redis_sintercardGet the cardinality (number of members) of the intersection of multiple sets.
{
"type": "object",
"required": [
"keys"
],
"properties": {
"keys": {
"type": "array",
"items": {
"type": "string"
},
"description": "Set keys to intersect"
},
"limit": {
"type": "integer",
"description": "Stop when reaching this count"
}
}
}redis_sunionGet the union of multiple sets.
{
"type": "object",
"required": [
"keys"
],
"properties": {
"keys": {
"type": "array",
"items": {
"type": "string"
},
"description": "Set keys to union"
}
}
}redis_sunionstoreStore the union of multiple sets in a new set.
{
"type": "object",
"required": [
"destination",
"keys"
],
"properties": {
"keys": {
"type": "array",
"items": {
"type": "string"
},
"description": "Set keys to union"
},
"destination": {
"type": "string",
"description": "Destination set key"
}
}
}redis_sdiffGet the difference between the first set and all successive sets.
{
"type": "object",
"required": [
"keys"
],
"properties": {
"keys": {
"type": "array",
"items": {
"type": "string"
},
"description": "Set keys (first is the base set)"
}
}
}redis_sdiffstoreStore the difference of multiple sets in a new set.
{
"type": "object",
"required": [
"destination",
"keys"
],
"properties": {
"keys": {
"type": "array",
"items": {
"type": "string"
},
"description": "Set keys (first is the base set)"
},
"destination": {
"type": "string",
"description": "Destination set key"
}
}
}redis_sscanIncrementally iterate over members of a set.
{
"type": "object",
"required": [
"key",
"cursor"
],
"properties": {
"key": {
"type": "string",
"description": "The set key"
},
"count": {
"type": "integer",
"description": "Hint for number of elements to return"
},
"match": {
"type": "string",
"description": "Pattern to match members"
},
"cursor": {
"type": "integer",
"minimum": 0,
"description": "Cursor position (start with 0)"
}
}
}redis_zaddAdd one or more members to a sorted set with scores.
{
"type": "object",
"required": [
"key"
],
"properties": {
"ch": {
"type": "boolean",
"description": "Return number of elements changed"
},
"gt": {
"type": "boolean",
"description": "Only update when new score > current score"
},
"lt": {
"type": "boolean",
"description": "Only update when new score < current score"
},
"nx": {
"type": "boolean",
"description": "Only add new elements"
},
"xx": {
"type": "boolean",
"description": "Only update existing elements"
},
"key": {
"type": "string",
"description": "The sorted set key"
},
"incr": {
"type": "boolean",
"description": "Act like ZINCRBY"
}
}
}redis_zremRemove one or more members from a sorted set.
{
"type": "object",
"required": [
"key",
"members"
],
"properties": {
"key": {
"type": "string",
"description": "The sorted set key"
},
"members": {
"type": "array",
"items": {
"type": "string"
},
"description": "Members to remove"
}
}
}redis_zcardGet the number of members in a sorted set.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The sorted set key"
}
}
}redis_zcountCount members in a sorted set with scores within the given range.
{
"type": "object",
"required": [
"key",
"min",
"max"
],
"properties": {
"key": {
"type": "string",
"description": "The sorted set key"
},
"max": {
"type": "string",
"description": "Maximum score (use \"+inf\" for no maximum)"
},
"min": {
"type": "string",
"description": "Minimum score (use \"-inf\" for no minimum)"
}
}
}redis_zscoreGet the score of a member in a sorted set.
{
"type": "object",
"required": [
"key",
"member"
],
"properties": {
"key": {
"type": "string",
"description": "The sorted set key"
},
"member": {
"type": "string",
"description": "The member"
}
}
}redis_zmscoreGet the scores of multiple members in a sorted set.
{
"type": "object",
"required": [
"key",
"members"
],
"properties": {
"key": {
"type": "string",
"description": "The sorted set key"
},
"members": {
"type": "array",
"items": {
"type": "string"
},
"description": "The members"
}
}
}redis_zrankGet the rank (position) of a member in a sorted set (lowest score = 0).
{
"type": "object",
"required": [
"key",
"member"
],
"properties": {
"key": {
"type": "string",
"description": "The sorted set key"
},
"member": {
"type": "string",
"description": "The member"
}
}
}redis_zrangeGet a range of members from a sorted set.
{
"type": "object",
"required": [
"key",
"start",
"stop"
],
"properties": {
"key": {
"type": "string",
"description": "The sorted set key"
},
"rev": {
"type": "boolean",
"description": "Reverse the order"
},
"stop": {
"type": "string",
"description": "Stop index or score/lex value"
},
"bylex": {
"type": "boolean",
"description": "Interpret start/stop as lexicographical values"
},
"count": {
"type": "integer",
"description": "Return at most this many elements"
},
"start": {
"type": "string",
"description": "Start index or score/lex value"
},
"offset": {
"type": "integer",
"minimum": 0,
"description": "Skip this many elements"
},
"byscore": {
"type": "boolean",
"description": "Interpret start/stop as scores"
},
"withscores": {
"type": "boolean",
"description": "Also return scores"
}
}
}redis_zrevrangeGet a range of members from a sorted set in reverse order.
{
"type": "object",
"required": [
"key",
"start",
"stop"
],
"properties": {
"key": {
"type": "string",
"description": "The sorted set key"
},
"stop": {
"type": "integer",
"description": "Stop index"
},
"start": {
"type": "integer",
"description": "Start index"
},
"withscores": {
"type": "boolean",
"description": "Also return scores"
}
}
}redis_zrangebyscoreGet members with scores within the given range.
{
"type": "object",
"required": [
"key",
"min",
"max"
],
"properties": {
"key": {
"type": "string",
"description": "The sorted set key"
},
"max": {
"type": "string",
"description": "Maximum score (use \"+inf\" for no maximum)"
},
"min": {
"type": "string",
"description": "Minimum score (use \"-inf\" for no minimum)"
},
"count": {
"type": "integer",
"description": "Return at most this many elements"
},
"offset": {
"type": "integer",
"minimum": 0,
"description": "Skip this many elements"
},
"withscores": {
"type": "boolean",
"description": "Also return scores"
}
}
}redis_xdelRemove entries from a stream.
{
"type": "object",
"required": [
"key",
"ids"
],
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Message IDs to delete"
},
"key": {
"type": "string",
"description": "The stream key"
}
}
}redis_zrevrangebyscoreGet members with scores within the given range in reverse order.
{
"type": "object",
"required": [
"key",
"max",
"min"
],
"properties": {
"key": {
"type": "string",
"description": "The sorted set key"
},
"max": {
"type": "string",
"description": "Maximum score (use \"+inf\" for no maximum)"
},
"min": {
"type": "string",
"description": "Minimum score (use \"-inf\" for no minimum)"
},
"count": {
"type": "integer",
"description": "Return at most this many elements"
},
"offset": {
"type": "integer",
"minimum": 0,
"description": "Skip this many elements"
},
"withscores": {
"type": "boolean",
"description": "Also return scores"
}
}
}redis_zpopminRemove and return members with the lowest scores.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The sorted set key"
},
"count": {
"type": "integer",
"description": "Number of members to pop"
}
}
}redis_zpopmaxRemove and return members with the highest scores.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The sorted set key"
},
"count": {
"type": "integer",
"description": "Number of members to pop"
}
}
}redis_zincrbyIncrement the score of a member in a sorted set.
{
"type": "object",
"required": [
"key",
"increment",
"member"
],
"properties": {
"key": {
"type": "string",
"description": "The sorted set key"
},
"member": {
"type": "string",
"description": "The member"
},
"increment": {
"type": "number",
"description": "The amount to increment by"
}
}
}redis_zinterstoreStore the intersection of multiple sorted sets in a new sorted set.
{
"type": "object",
"required": [
"destination",
"keys"
],
"properties": {
"keys": {
"type": "array",
"items": {
"type": "string"
},
"description": "Sorted set keys to intersect"
},
"weights": {
"type": "array",
"items": {
"type": "number"
},
"description": "Multiplication factors for each set"
},
"aggregate": {
"enum": [
"SUM",
"MIN",
"MAX"
],
"type": "string",
"description": "How to aggregate scores"
},
"destination": {
"type": "string",
"description": "Destination sorted set key"
}
}
}redis_zunionstoreStore the union of multiple sorted sets in a new sorted set.
{
"type": "object",
"required": [
"destination",
"keys"
],
"properties": {
"keys": {
"type": "array",
"items": {
"type": "string"
},
"description": "Sorted set keys to union"
},
"weights": {
"type": "array",
"items": {
"type": "number"
},
"description": "Multiplication factors for each set"
},
"aggregate": {
"enum": [
"SUM",
"MIN",
"MAX"
],
"type": "string",
"description": "How to aggregate scores"
},
"destination": {
"type": "string",
"description": "Destination sorted set key"
}
}
}redis_zdiffstoreStore the difference of sorted sets in a new sorted set.
{
"type": "object",
"required": [
"destination",
"keys"
],
"properties": {
"keys": {
"type": "array",
"items": {
"type": "string"
},
"description": "Sorted set keys (first is the base set)"
},
"destination": {
"type": "string",
"description": "Destination sorted set key"
}
}
}redis_zlexcountCount members in a sorted set within the given lexicographical range.
{
"type": "object",
"required": [
"key",
"min",
"max"
],
"properties": {
"key": {
"type": "string",
"description": "The sorted set key"
},
"max": {
"type": "string",
"description": "Maximum lex value (use \"+\" for highest, \"[value\" or \"(value"
},
"min": {
"type": "string",
"description": "Minimum lex value (use \"-\" for lowest, \"[value\" or \"(value"
}
}
}redis_zremrangebyrankRemove members in a sorted set within the given index range.
{
"type": "object",
"required": [
"key",
"start",
"stop"
],
"properties": {
"key": {
"type": "string",
"description": "The sorted set key"
},
"stop": {
"type": "integer",
"description": "Stop index (inclusive)"
},
"start": {
"type": "integer",
"description": "Start index"
}
}
}redis_zremrangebyscoreRemove members in a sorted set within the given score range.
{
"type": "object",
"required": [
"key",
"min",
"max"
],
"properties": {
"key": {
"type": "string",
"description": "The sorted set key"
},
"max": {
"type": "string",
"description": "Maximum score"
},
"min": {
"type": "string",
"description": "Minimum score"
}
}
}redis_zremrangebylexRemove members in a sorted set within the given lexicographical range.
{
"type": "object",
"required": [
"key",
"min",
"max"
],
"properties": {
"key": {
"type": "string",
"description": "The sorted set key"
},
"max": {
"type": "string",
"description": "Maximum lex value"
},
"min": {
"type": "string",
"description": "Minimum lex value"
}
}
}redis_zscanIncrementally iterate over members and scores of a sorted set.
{
"type": "object",
"required": [
"key",
"cursor"
],
"properties": {
"key": {
"type": "string",
"description": "The sorted set key"
},
"count": {
"type": "integer",
"description": "Hint for number of elements to return"
},
"match": {
"type": "string",
"description": "Pattern to match members"
},
"cursor": {
"type": "integer",
"minimum": 0,
"description": "Cursor position (start with 0)"
}
}
}redis_zrandmemberGet one or more random members from a sorted set.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The sorted set key"
},
"count": {
"type": "integer",
"description": "Number of members to return (negative allows duplicates)"
},
"withscores": {
"type": "boolean",
"description": "Also return scores"
}
}
}redis_xaddAppend a message to a stream.
{
"type": "object",
"required": [
"key",
"id",
"fields"
],
"properties": {
"id": {
"type": "string",
"description": "Message ID (* for auto-generated)"
},
"key": {
"type": "string",
"description": "The stream key"
},
"limit": {
"type": "integer",
"description": "Maximum entries to evict"
},
"minid": {
"type": "string",
"description": "Minimum ID to keep"
},
"fields": {
"type": "object",
"description": "Field-value pairs for the message"
},
"maxlen": {
"type": "integer",
"description": "Cap stream length"
},
"nomkstream": {
"type": "boolean",
"description": "Don't create stream if it doesn't exist"
},
"approximate": {
"type": "boolean",
"description": "Allow approximate trimming"
}
}
}redis_xlenGet the number of entries in a stream.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The stream key"
}
}
}redis_xrangeRead a range of entries from a stream.
{
"type": "object",
"required": [
"key",
"start",
"end"
],
"properties": {
"end": {
"type": "string",
"description": "End ID (+ for maximum)"
},
"key": {
"type": "string",
"description": "The stream key"
},
"count": {
"type": "integer",
"description": "Maximum entries to return"
},
"start": {
"type": "string",
"description": "Start ID (- for minimum)"
}
}
}redis_xrevrangeRead a range of entries from a stream in reverse order.
{
"type": "object",
"required": [
"key",
"end",
"start"
],
"properties": {
"end": {
"type": "string",
"description": "End ID (+ for maximum)"
},
"key": {
"type": "string",
"description": "The stream key"
},
"count": {
"type": "integer",
"description": "Maximum entries to return"
},
"start": {
"type": "string",
"description": "Start ID (- for minimum)"
}
}
}redis_xtrimTrim a stream to a specified length or minimum ID.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The stream key"
},
"limit": {
"type": "integer",
"description": "Maximum entries to evict"
},
"minid": {
"type": "string",
"description": "Minimum ID to keep"
},
"maxlen": {
"type": "integer",
"description": "Maximum length"
},
"approximate": {
"type": "boolean",
"description": "Allow approximate trimming"
}
}
}redis_xinfoGet information about a stream, consumer groups, or consumers.
{
"type": "object",
"required": [
"subcommand",
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The stream key"
},
"group": {
"type": "string",
"description": "Consumer group name (required for CONSUMERS)"
},
"subcommand": {
"enum": [
"STREAM",
"GROUPS",
"CONSUMERS"
],
"type": "string",
"description": "Info subcommand"
}
}
}redis_xgroup_createCreate a consumer group for a stream.
{
"type": "object",
"required": [
"key",
"group",
"id"
],
"properties": {
"id": {
"type": "string",
"description": "Starting ID ($ for new messages only, 0 for all)"
},
"key": {
"type": "string",
"description": "The stream key"
},
"group": {
"type": "string",
"description": "Consumer group name"
},
"mkstream": {
"type": "boolean",
"description": "Create stream if it does not exist"
}
}
}redis_xgroup_destroyDestroy a consumer group.
{
"type": "object",
"required": [
"key",
"group"
],
"properties": {
"key": {
"type": "string",
"description": "The stream key"
},
"group": {
"type": "string",
"description": "Consumer group name"
}
}
}redis_xgroup_setidSet the last delivered ID of a consumer group.
{
"type": "object",
"required": [
"key",
"group",
"id"
],
"properties": {
"id": {
"type": "string",
"description": "New last delivered ID"
},
"key": {
"type": "string",
"description": "The stream key"
},
"group": {
"type": "string",
"description": "Consumer group name"
}
}
}redis_xgroup_createconsumerCreate a consumer in a consumer group.
{
"type": "object",
"required": [
"key",
"group",
"consumer"
],
"properties": {
"key": {
"type": "string",
"description": "The stream key"
},
"group": {
"type": "string",
"description": "Consumer group name"
},
"consumer": {
"type": "string",
"description": "Consumer name"
}
}
}redis_xgroup_delconsumerDelete a consumer from a consumer group.
{
"type": "object",
"required": [
"key",
"group",
"consumer"
],
"properties": {
"key": {
"type": "string",
"description": "The stream key"
},
"group": {
"type": "string",
"description": "Consumer group name"
},
"consumer": {
"type": "string",
"description": "Consumer name"
}
}
}redis_xackAcknowledge one or more messages as processed.
{
"type": "object",
"required": [
"key",
"group",
"ids"
],
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Message IDs to acknowledge"
},
"key": {
"type": "string",
"description": "The stream key"
},
"group": {
"type": "string",
"description": "Consumer group name"
}
}
}redis_psetexSet the value and expiration (in milliseconds) of a key.
{
"type": "object",
"required": [
"key",
"milliseconds",
"value"
],
"properties": {
"key": {
"type": "string",
"description": "The key to set"
},
"value": {
"type": "string",
"description": "The value to set"
},
"milliseconds": {
"type": "integer",
"description": "Expiration time in milliseconds"
}
}
}redis_xpendingGet information about pending messages in a consumer group.
{
"type": "object",
"required": [
"key",
"group"
],
"properties": {
"end": {
"type": "string",
"description": "End ID"
},
"key": {
"type": "string",
"description": "The stream key"
},
"idle": {
"type": "integer",
"description": "Filter by minimum idle time (ms)"
},
"count": {
"type": "integer",
"description": "Maximum entries"
},
"group": {
"type": "string",
"description": "Consumer group name"
},
"start": {
"type": "string",
"description": "Start ID"
},
"consumer": {
"type": "string",
"description": "Filter by consumer"
}
}
}redis_getGet the string value of a key. Returns null if the key does not exist.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key to get"
}
}
}redis_setSet the string value of a key. Supports expiration and conditional set options.
{
"type": "object",
"required": [
"key",
"value"
],
"properties": {
"ex": {
"type": "integer",
"description": "Set expiration in seconds"
},
"nx": {
"type": "boolean",
"description": "Only set if key does not exist"
},
"px": {
"type": "integer",
"description": "Set expiration in milliseconds"
},
"xx": {
"type": "boolean",
"description": "Only set if key already exists"
},
"get": {
"type": "boolean",
"description": "Return the old value stored at key"
},
"key": {
"type": "string",
"description": "The key to set"
},
"exat": {
"type": "integer",
"description": "Set expiration as Unix timestamp in seconds"
},
"pxat": {
"type": "integer",
"description": "Set expiration as Unix timestamp in milliseconds"
},
"value": {
"type": "string",
"description": "The value to set"
},
"keepttl": {
"type": "boolean",
"description": "Retain the TTL of the existing key"
}
}
}redis_mgetGet the values of multiple keys. Returns null for keys that do not exist.
{
"type": "object",
"required": [
"keys"
],
"properties": {
"keys": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of keys to get"
}
}
}redis_msetSet multiple keys to multiple values atomically.
{
"type": "object",
"required": [
"keyValues"
],
"properties": {
"keyValues": {
"type": "object",
"description": "Object of key-value pairs to set"
}
}
}redis_appendAppend a value to a key. Creates the key if it does not exist.
{
"type": "object",
"required": [
"key",
"value"
],
"properties": {
"key": {
"type": "string",
"description": "The key to append to"
},
"value": {
"type": "string",
"description": "The value to append"
}
}
}redis_strlenGet the length of the value stored at a key.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key to check"
}
}
}redis_incrIncrement the integer value of a key by one. Creates the key with value 0 if it does not exist.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key to increment"
}
}
}redis_incrbyIncrement the integer value of a key by the given amount.
{
"type": "object",
"required": [
"key",
"increment"
],
"properties": {
"key": {
"type": "string",
"description": "The key to increment"
},
"increment": {
"type": "integer",
"description": "The amount to increment by"
}
}
}redis_incrbyfloatIncrement the floating point value of a key by the given amount.
{
"type": "object",
"required": [
"key",
"increment"
],
"properties": {
"key": {
"type": "string",
"description": "The key to increment"
},
"increment": {
"type": "number",
"description": "The amount to increment by"
}
}
}redis_decrDecrement the integer value of a key by one.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key to decrement"
}
}
}redis_decrbyDecrement the integer value of a key by the given amount.
{
"type": "object",
"required": [
"key",
"decrement"
],
"properties": {
"key": {
"type": "string",
"description": "The key to decrement"
},
"decrement": {
"type": "integer",
"description": "The amount to decrement by"
}
}
}redis_getrangeGet a substring of the string value stored at a key.
{
"type": "object",
"required": [
"key",
"start",
"end"
],
"properties": {
"end": {
"type": "integer",
"description": "End offset (inclusive, negative values count from end)"
},
"key": {
"type": "string",
"description": "The key"
},
"start": {
"type": "integer",
"description": "Start offset (0-based, negative values count from end)"
}
}
}redis_setrangeOverwrite part of a string at key starting at the specified offset.
{
"type": "object",
"required": [
"key",
"offset",
"value"
],
"properties": {
"key": {
"type": "string",
"description": "The key"
},
"value": {
"type": "string",
"description": "The value to write"
},
"offset": {
"type": "integer",
"minimum": 0,
"description": "Start offset"
}
}
}redis_getexGet the value of a key and optionally set its expiration.
{
"type": "object",
"required": [
"key"
],
"properties": {
"ex": {
"type": "integer",
"description": "Set expiration in seconds"
},
"px": {
"type": "integer",
"description": "Set expiration in milliseconds"
},
"key": {
"type": "string",
"description": "The key to get"
},
"exat": {
"type": "integer",
"description": "Set expiration as Unix timestamp in seconds"
},
"pxat": {
"type": "integer",
"description": "Set expiration as Unix timestamp in milliseconds"
},
"persist": {
"type": "boolean",
"description": "Remove the TTL"
}
}
}redis_getdelGet the value of a key and delete it.
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key to get and delete"
}
}
}redis_setnxSet the value of a key only if the key does not exist.
{
"type": "object",
"required": [
"key",
"value"
],
"properties": {
"key": {
"type": "string",
"description": "The key to set"
},
"value": {
"type": "string",
"description": "The value to set"
}
}
}redis_setexSet the value and expiration (in seconds) of a key.
{
"type": "object",
"required": [
"key",
"seconds",
"value"
],
"properties": {
"key": {
"type": "string",
"description": "The key to set"
},
"value": {
"type": "string",
"description": "The value to set"
},
"seconds": {
"type": "integer",
"description": "Expiration time in seconds"
}
}
}redis_getsetAtomically set a key to a value and return the old value.
{
"type": "object",
"required": [
"key",
"value"
],
"properties": {
"key": {
"type": "string",
"description": "The key to set"
},
"value": {
"type": "string",
"description": "The new value"
}
}
}