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

# Set Variable (AI Tool)

> Store a value in a named variable that can be retrieved later. Useful for remembering user preferences, intermediate results, or any data the AI needs to persist across tool calls.

# Set Variable (AI Tool)

Store a value in a named variable that can be retrieved later. Useful for remembering user preferences, intermediate results, or any data the AI needs to persist across tool calls.

## Properties

| Property   | Value                |
| ---------- | -------------------- |
| **Type**   | ai-set-variable-tool |
| **Family** | AI                   |
| **Group**  | Tools                |

## Parameters

| Name            | Label            | Type   | Description                                                                   | Required |
| --------------- | ---------------- | ------ | ----------------------------------------------------------------------------- | -------- |
| toolName        | Tool Name        | String | Name the AI will use to call this tool                                        | Yes      |
| toolDescription | Tool Description | String | Description to help the AI understand when to use this tool                   | Yes      |
| variableName    | Variable Name    | String | The name of the variable to set (e.g., 'user\_preference', 'search\_results') | No       |
| value           | Value            | String | The value to store (can be a string, number, JSON object, or array)           | No       |

## Outputs

| Name         | Label        | Type    | Description                       |
| ------------ | ------------ | ------- | --------------------------------- |
| variableName | variableName | string  | Name of the variable that was set |
| value        | value        | any     | The value that was stored         |
| success      | success      | boolean | Whether the operation succeeded   |
