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

# graph plan step add

> Append a step, or anchor it before/after an existing one

Adds one step and validates the plan. The edit is refused if it adds a validation problem.

## Arguments

**NAME|PATH** `string` *required*

The plan's identifier or YAML file path

**ID** `string` *required*

Step id — how later steps reference it as \{\{\<id>.field}}

**TOOL** `string` *required*

Tool name, or a control step: exit, agent, ask, route, filter, map, reduce

**JSON|@FILE|-** `string` *required*

The step's input object: inline JSON, @file.json, or - for stdin

## Options

**--reasoning** `string`

Why this step exists (carried into the plan for readers)

Format: `REASONING`.

**--before** `string`

Insert before this step id instead of appending

Format: `ID`.

**--after** `string`

Insert after this step id instead of appending

Format: `ID`.

**--json** `boolean`

Print a JSON envelope instead of text

## Global options

**-v, --verbose** `integer`

Increase log verbosity (-v info, -vv debug, -vvv trace)

```bash Usage theme={null}
graph plan step add [OPTIONS] <NAME|PATH> <ID> <TOOL> <JSON|@FILE|->
```

```bash Example 1 theme={null}
graph plan step add weekly_changes E1 github__tool__git_log '{"base":"{{input.base}}","head":"HEAD"}'
```

```bash Example 2 theme={null}
graph plan step add weekly_changes G1 exit '{"when":{"value":"{{E1.count}}","op":"eq","to":0},"status":"success","message":"Nothing shipped"}' --after E1
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.