ResourceCommandAnnotation Properties
Class Properties 13 members
Represents a command annotation for a resource.
Gets the invocation arguments accepted by the command.
public IReadOnlyList<InteractionInput> Arguments { get; }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.
When a confirmation message is specified, the UI will prompt with an OK/Cancel dialog and the confirmation message before starting the command.
public string? ConfirmationMessage { get; } Optional description of the command, to be shown in the UI. Could be used as a tooltip. May be localized.
public string? DisplayDescription { get; } The display name visible in UI.
public string DisplayName { get; }ExecuteCommand Section titled ExecuteCommand Func<ExecuteCommandContext, Task<ExecuteCommandResult>> A callback that is executed when the command is executed. The result is used to indicate success or failure in the UI.
public Func<ExecuteCommandContext, Task<ExecuteCommandResult>> ExecuteCommand { get; } The icon name for the command. The name should be a valid FluentUI icon name. https://aka.ms/fluentui-system-icons
public string? IconName { get; } The icon variant for the command.
public IconVariant? IconVariant { get; } A flag indicating whether the command is highlighted in the UI.
public bool IsHighlighted { get; } The name of command. The name uniquely identifies the command.
public string Name { get; } Obsolete optional parameter that configures the command in some way. Clients must return any value provided by the server when invoking the command.
public object? Parameter { get; } A callback that is used to update the command state. The callback is executed when the command's resource snapshot is updated.
public Func<UpdateCommandStateContext, ResourceCommandState> UpdateState { get; }ValidateArguments Section titled ValidateArguments nullable Func<InputsDialogValidationContext, Task> Gets the callback that validates invocation arguments before the command callback is executed.
public Func<InputsDialogValidationContext, Task>? ValidateArguments { get; } Gets where the command is visible to users and clients.
public ResourceCommandVisibility Visibility { get; }