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

# Schema-Driven Integration

> Use the machine-readable command schema to generate dynamic tooling.

## Fetch schema

```bash theme={null}
defi schema --results-only
```

Scope to a specific command path:

```bash theme={null}
defi schema "yield opportunities" --results-only
defi schema "bridge quote" --results-only
```

## Schema model

Each node contains:

* `path`
* `use`
* `short`
* `flags[]` (`name`, `type`, `usage`, typed `default`, optional `shorthand`, `required`, `enum`, `format`, `scope`)
* optional command metadata such as `mutation`, `input_modes`, `input_constraints`, `auth`, `request`, and `response`
* `subcommands[]`

## Practical uses

* Generate UI forms from flag metadata.
* Validate requested flags before execution.
* Enforce cross-field rules like `exactly_one_of(wallet, from_address)` before execution.
* Discover auth requirements and structured input modes at runtime.
* Produce autocomplete for command builders.
* Build policy-aware execution layers with `--enable-commands`.

## Notes

* Hidden commands are not included.
* Execution `plan` and `submit` commands expose the same request fields through flags and structured JSON/file input; flags override structured input values.
* Runtime constraints (for example, mutually exclusive amount flags) still require command execution validation.
