> ## 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.

# builtin__check_plan

> Validates a plan written as YAML, optionally after applying a patch to it.

## Checks

* Structure, templates, and every tool against the catalog.
* Agent steps list their tools; `agent__chat` isn't used.

## Patches

* `patch` replaces steps by id, removes ids, or sets `input_schema` or `output` before checking.

| Available to | Effect |
| - | - |
| Any agent or plan step | Read-only |

## Input

**patch** `string`

Optional YAML patch to apply first

**pending** `boolean`

Answers that the plan has not taken in yet; the plan is not settled while true

**search** `string[]`

Tools the model asked to be searched for; the plan is not settled while any are pending

**yaml** `string` *required*

The plan as YAML

## Output

**plan** `object | null` *required*

**problems** `string[]` *required*

**search** `string[]`

The tool searches still requested, including any written into the plan by mistake

**settled** `boolean` *required*

Valid, with no search requested and no answers pending

**valid** `boolean` *required*

**yaml** `string` *required*

```yaml Plan step theme={null}
- id: E1
  tool_name: builtin__check_plan
  input:
    yaml: "{{input.yaml}}"
```


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