CommandOptions Properties
ResourceBuilderExtensions.WithCommand. public IReadOnlyList<InteractionInput> Arguments { get; set; }Remarks
The list order is part of the command contract. CLI positional arguments are mapped to this list by index before the command executes. Clients that submit named argument payloads, such as Dashboard and MCP clients, map values by InteractionInput.Name.
public string? ConfirmationMessage { get; set; }public string? Description { get; set; }public string? IconName { get; set; }public IconVariant? IconVariant { get; set; }public bool IsHighlighted { get; set; }public object? Parameter { get; set; }UpdateState Section titled UpdateState nullable Func<UpdateCommandStateContext, ResourceCommandState> A callback that is used to update the command state. The callback is executed when the command's resource snapshot is updated.
If a callback isn't specified, the command is always enabled.
public Func<UpdateCommandStateContext, ResourceCommandState>? UpdateState { get; set; }ValidateArguments Section titled ValidateArguments nullable Func<InputsDialogValidationContext, Task> public Func<InputsDialogValidationContext, Task>? ValidateArguments { get; set; }Remarks
When validation errors are added to the InputsDialogValidationContext, the command callback is not executed. Dashboard clients can display the errors next to the matching inputs, while API clients can report the same errors to callers.
public ResourceCommandVisibility Visibility { get; set; }Remarks
ResourceCommandVisibility.UI flag when displaying commands, and API clients use the ResourceCommandVisibility.Api flag when discovering commands. Visibility controls discovery and display, not authorization. Use ResourceCommandVisibility.Api without ResourceCommandVisibility.UI for headless or agent-oriented commands that should not be displayed in the dashboard UI.