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

# Variables & Inputs

> Read and write flow variables from a Code Step with double-brace placeholders, and pass extra values in as mapped inputs.

## Variable Reads

Read a configured variable with double-brace notation. The placeholder is rendered internally as a canonical variable lookup.

```python theme={null}
def run():
    email = {{contact.email}}
    return bool(email)
```

***

## Variable Writes

Write to a configured variable by assigning to the placeholder. The write updates the canonical runtime variable map.

```python theme={null}
def run():
    email = {{contact.email}}
    {{contact.email_verified}} = bool(email and "@" in email)
    return {{contact.email_verified}}
```

***

## Custom Variable Reads

Read custom / object-backed values under the `custom` namespace. Custom paths use dot notation.

```python theme={null}
def run():
    first_name = {{custom.contact.first_name}}
    return bool(first_name)
```

***

## Custom Variable Writes

Write custom / object-backed values the same way. Nested dictionaries are created when needed.

```python theme={null}
def run():
    first_name = {{custom.contact.first_name}}
    {{custom.contact.display_name}} = str(first_name or "").strip()
    return True
```

***

## Mapped Inputs

The first input on the step is reserved for the code string itself. Any extra numeric inputs mapped on the step are injected into the code as `input_1`, `input_2`, and so on.

```python theme={null}
def run():
    return bool(input_1)
```

If `input_1` is referenced but no matching input is mapped on the step, the tool fails at runtime with a line-specific system note. This is also how a parent composite tool's input is passed into a sub-flow Code Step.

***

## Raw Code Input

The Code Step intentionally reads the **raw** source you write, not a pre-substituted version. This lets the `{{...}}` placeholders survive long enough for the Code Step to render them itself.

Write placeholders directly in your code:

```python theme={null}
def run():
    flag = {{auth_check.verified}}
    return bool(flag)
```

Do not pre-render placeholders into Python manually — let the Code Step resolve them.

***

## Next Steps

* [Code Step overview](/tools/code-step/overview) — The `run()` contract
* [Allowed Functions](/tools/code-step/functions) — The full deny-by-default allow-list
* [Examples](/tools/code-step/examples) — Common patterns and troubleshooting
