Documentation

Nested Schema

The nested format embeds parameters and subcommands directly inside each command object. This mirrors how most CLI tools present their help output and is more natural to author by hand.

Unlike the Flat Schema, there are no key or commandKey fields - the hierarchy is expressed via nesting. Exclusion groups reference parameters by name instead of key.

Document Object

FieldTypeRequiredDescription
binaryNamestringUnique CLI binary name for the tool.
displayNamestringHuman-readable display name.
interactiveboolean-If true, invoking the root tool opens an interactive session or prompt.
infoToolInfo Object-Metadata about the tool. See ToolInfo.
urlstring-URL to the tool's homepage or repository.
rootParametersNestedParameter Object[]Parameters available on the root invocation when no command is selected.
globalParametersNestedParameter Object[]Parameters that apply across all commands.
commandsNestedCommand Object[]List of commands with embedded parameters and subcommands.
exclusionGroupsNestedExclusionGroup Object[] | null-Groups of mutually exclusive or required parameters.
metadataToolMetadata Object-Custom metadata.
$schemastring-URL to the JSON Schema for editor validation.

NestedCommand Object

FieldTypeRequiredDescription
namestringCommand name as it appears in the CLI invocation.
descriptionstring-Human-readable description of the command.
interactiveboolean-If true, the command requires interactive user input.
sortOrdernumber-Display sort order. Defaults to 0.
parametersNestedParameter Object[]Parameters belonging to this command.
subcommandsNestedCommand Object[]Nested subcommands. Use an empty array if none.
exclusionGroupsNestedExclusionGroup Object[]-Exclusion groups scoped to this command.

NestedParameter Object

Identical to the flat Parameter Object, but without key and commandKey since hierarchy is expressed via nesting instead.

FieldTypeRequiredDescription
namestringHuman-readable parameter name. Also used as the identifier in exclusion groups.
parameterTypeParameterTypeOne of Flag, Option, or Argument.
dataTypeParameterDataTypeOne of String, Number, Boolean, or Enum.
isRequiredboolean-Whether the parameter must be provided.
isRepeatableboolean-Whether the parameter can appear more than once.
isGlobalboolean-If true, the parameter applies to all commands.
descriptionstring-Human-readable description.
groupstring-Display group label.
shortFlagstring-Short flag form (e.g. -o).
longFlagstring-Long flag form (e.g. --output).
positionnumber-Zero-based positional index. Required for Argument type.
sortOrdernumber-Display sort order.
arraySeparatorstring-Separator for repeatable parameters joined into a single token.
keyValueSeparatorstring-Character between the flag and its value. Defaults to a space.
enumParameterEnumValues Object-Required when dataType is Enum. See ParameterEnumValues.
validationsNestedParameterValidation Object[]-Validation rules.
dependenciesNestedParameterDependency Object[]-Conditional relationships with other parameters.
metadataParameterMetadata Object-Custom metadata. See ParameterMetadata.

NestedParameterValidation Object

Equivalent to ParameterValidation, without the key field.

FieldTypeRequiredDescription
validationTypeParameterValidationTypeThe kind of validation. See ParameterValidationType.
validationValuestringThreshold or pattern for the validation.
errorMessagestringMessage displayed when validation fails.

NestedParameterDependency Object

Equivalent to ParameterDependency, but references parameters by name instead of key.

FieldTypeRequiredDescription
dependsOnParameterstringName of the parameter being depended upon.
dependencyTypeParameterDependencyTypeOne of requires or conflicts_with. See ParameterDependencyType.
conditionValuestring-Specific value of dependsOnParameter that activates this dependency.

NestedExclusionGroup Object

Equivalent to ExclusionGroup, but references parameters by name instead of key.

FieldTypeRequiredDescription
namestringHuman-readable group name.
exclusionTypeExclusionTypeOne of mutual_exclusive or required_one_of. See ExclusionType.
parametersstring[]Names of the parameters in this group.