> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# redis

> Key-value operations

**Server path:** `/redis` | **Type:** Application | **PCID required:** Yes

## Tools

| Tool                            | Description                    |
| ------------------------------- | ------------------------------ |
| [`redis_set`](#redis_set)       | Set a key-value pair in Redis  |
| [`redis_get`](#redis_get)       | Get value by key from Redis    |
| [`redis_delete`](#redis_delete) | Delete a key from Redis        |
| [`redis_exists`](#redis_exists) | Check if a key exists in Redis |
| [`redis_keys`](#redis_keys)     | Get keys matching a pattern    |
| [`redis_hset`](#redis_hset)     | Set field in Redis hash        |
| [`redis_hget`](#redis_hget)     | Get field from Redis hash      |
| [`redis_lpush`](#redis_lpush)   | Push element to Redis list     |
| [`redis_lrange`](#redis_lrange) | Get range from Redis list      |

***

## redis\_set

Set a key-value pair in Redis

**Parameters:**

| Parameter | Type   | Required | Default | Description             |
| --------- | ------ | -------- | ------- | ----------------------- |
| `key`     | string | Yes      | —       | Redis key               |
| `value`   | string | Yes      | —       | Value to store          |
| `ttl`     | number | No       | —       | Time to live in seconds |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "key": {
        "type": "string",
        "description": "Redis key"
      },
      "value": {
        "type": "string",
        "description": "Value to store"
      },
      "ttl": {
        "type": "number",
        "description": "Time to live in seconds"
      }
    },
    "required": [
      "PCID",
      "key",
      "value"
    ]
  }
  ```
</Expandable>

***

## redis\_get

Get value by key from Redis

**Parameters:**

| Parameter | Type   | Required | Default | Description           |
| --------- | ------ | -------- | ------- | --------------------- |
| `key`     | string | Yes      | —       | Redis key to retrieve |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "key": {
        "type": "string",
        "description": "Redis key to retrieve"
      }
    },
    "required": [
      "PCID",
      "key"
    ]
  }
  ```
</Expandable>

***

## redis\_delete

Delete a key from Redis

**Parameters:**

| Parameter | Type   | Required | Default | Description         |
| --------- | ------ | -------- | ------- | ------------------- |
| `key`     | string | Yes      | —       | Redis key to delete |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "key": {
        "type": "string",
        "description": "Redis key to delete"
      }
    },
    "required": [
      "PCID",
      "key"
    ]
  }
  ```
</Expandable>

***

## redis\_exists

Check if a key exists in Redis

**Parameters:**

| Parameter | Type   | Required | Default | Description        |
| --------- | ------ | -------- | ------- | ------------------ |
| `key`     | string | Yes      | —       | Redis key to check |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "key": {
        "type": "string",
        "description": "Redis key to check"
      }
    },
    "required": [
      "PCID",
      "key"
    ]
  }
  ```
</Expandable>

***

## redis\_keys

Get keys matching a pattern

**Parameters:**

| Parameter | Type   | Required | Default | Description          |
| --------- | ------ | -------- | ------- | -------------------- |
| `pattern` | string | No       | `"*"`   | Key pattern to match |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "pattern": {
        "type": "string",
        "default": "*",
        "description": "Key pattern to match"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## redis\_hset

Set field in Redis hash

**Parameters:**

| Parameter | Type   | Required | Default | Description |
| --------- | ------ | -------- | ------- | ----------- |
| `key`     | string | Yes      | —       | Hash key    |
| `field`   | string | Yes      | —       | Field name  |
| `value`   | string | Yes      | —       | Field value |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "key": {
        "type": "string",
        "description": "Hash key"
      },
      "field": {
        "type": "string",
        "description": "Field name"
      },
      "value": {
        "type": "string",
        "description": "Field value"
      }
    },
    "required": [
      "PCID",
      "key",
      "field",
      "value"
    ]
  }
  ```
</Expandable>

***

## redis\_hget

Get field from Redis hash

**Parameters:**

| Parameter | Type   | Required | Default | Description |
| --------- | ------ | -------- | ------- | ----------- |
| `key`     | string | Yes      | —       | Hash key    |
| `field`   | string | Yes      | —       | Field name  |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "key": {
        "type": "string",
        "description": "Hash key"
      },
      "field": {
        "type": "string",
        "description": "Field name"
      }
    },
    "required": [
      "PCID",
      "key",
      "field"
    ]
  }
  ```
</Expandable>

***

## redis\_lpush

Push element to Redis list

**Parameters:**

| Parameter | Type   | Required | Default | Description   |
| --------- | ------ | -------- | ------- | ------------- |
| `key`     | string | Yes      | —       | List key      |
| `value`   | string | Yes      | —       | Value to push |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "key": {
        "type": "string",
        "description": "List key"
      },
      "value": {
        "type": "string",
        "description": "Value to push"
      }
    },
    "required": [
      "PCID",
      "key",
      "value"
    ]
  }
  ```
</Expandable>

***

## redis\_lrange

Get range from Redis list

**Parameters:**

| Parameter | Type   | Required | Default | Description |
| --------- | ------ | -------- | ------- | ----------- |
| `key`     | string | Yes      | —       | List key    |
| `start`   | number | No       | `0`     | Start index |
| `stop`    | number | No       | `-1`    | Stop index  |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "key": {
        "type": "string",
        "description": "List key"
      },
      "start": {
        "type": "number",
        "default": 0,
        "description": "Start index"
      },
      "stop": {
        "type": "number",
        "default": -1,
        "description": "Stop index"
      }
    },
    "required": [
      "PCID",
      "key"
    ]
  }
  ```
</Expandable>
