# input.text

Declares and checks one field of the trigger envelope: a string at $trigger.body.<name>

# input.text

```
input.text --name VALUE [--label VALUE] [--optional] [--default VALUE] [--max VALUE]
```

Declares and checks one field of the trigger envelope: a string at `$trigger.body.<name>`. Required by default — a missing or invalid value refuses the run with `FW_NODE_INPUT_MISSING` / `FW_NODE_INPUT_INVALID`, naming the field and what was expected; `--optional` allows absence (the answer is then null). Answers one key, its `--name`: the next node reads `input.<name>`, any later one `$nodes.<id>.<name>`, and the rest of the payload is kept. A field that was not sent and has `--default` answers the checked default, so every path (DSL/MCP execute, webhook, Run form) gives the same answer. The input nodes after a trigger are its declaration: the Studio builds the Run form from them and an agent reads them to know what to send. Works after [`trigger.manual`](/nodes/trigger/trigger.manual.md) and after [`trigger.webhook`](/nodes/trigger/trigger.webhook.md). Fetches nothing, stores nothing.

## Flags

- `--name` (required): The envelope field this node declares, and the key it answers — also the first bare token: `text <name>`.
- `--label`: Form label shown in the Run form. Default: the field name.
- `--optional`: A missing value is allowed; the node's value is then null.
- `--default`: Value used when the field is missing (text, number, boolean, json).
- `--max`: Longest string accepted, in characters.

## Examples

### A caption the Run form asks for

```
| input.text prompt --label "Caption" --max 200
```

Read from `$trigger.body.prompt`; the checked string is `input.prompt` next, `$nodes.<id>.prompt` anywhere later.

Input:

```json
{
  "manual": {
    "body": {
      "prompt": "A cat on a mat"
    }
  }
}
```

It answers:

```json
{
  "manual": {
    "body": {
      "prompt": "A cat on a mat"
    }
  },
  "prompt": "A cat on a mat"
}
```
