Skip to content

CommandAnnotations

Structured behavioral annotations for a command. Used by both human-facing surfaces (--help) and programmatic surfaces (MCP tool registration).

public sealed record CommandAnnotations : IEquatable<CommandAnnotations>
  • IEquatable<CommandAnnotations>

Hides the command from programmatic/automation surfaces. Unlike Hidden(bool), which hides from all surfaces, this only suppresses programmatic discovery (e.g. MCP tool registration). The command remains visible in interactive help and REPL.

public bool AutomationHidden { get; init; }

bool

Indicates the command modifies state (deletes, updates, etc.). When exposed to agents, triggers a confirmation prompt before execution.

public bool Destructive { get; init; }

bool

Indicates the command can be called multiple times with the same result. Agents may safely retry idempotent commands on transient failure.

public bool Idempotent { get; init; }

bool

Indicates the command may take a long time to complete. Enables task-based execution in programmatic clients.

public bool LongRunning { get; init; }

bool

Indicates the command interacts with external systems beyond the app. Helps agents anticipate latency and failure modes.

public bool OpenWorld { get; init; }

bool

Indicates the command only reads data without side effects. ReadOnly commands are auto-promoted to MCP resources.

public bool ReadOnly { get; init; }

bool