Class ToolAnnotations | MCP C# SDK

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Represents additional properties describing a Tool to clients.

public sealed class ToolAnnotations
Inheritance

ToolAnnotations

Inherited Members

Properties

DestructiveHint

Gets or sets a value that indicates whether the tool can perform destructive updates to its environment.

[JsonPropertyName("destructiveHint")]
public bool? DestructiveHint { get; set; }

Property Value

bool?

true if the tool can perform destructive updates to its environment; false if the tool performs only additive updates; null if unspecified, in which case clients should assume true.

IdempotentHint

Gets or sets a value that indicates whether calling the tool repeatedly with the same arguments has no additional effect on its environment.

[JsonPropertyName("idempotentHint")]
public bool? IdempotentHint { get; set; }

Property Value

bool?

true if calling the tool repeatedly with the same arguments has no additional effect on the environment; false if it does; null if unspecified, in which case clients should assume false.

OpenWorldHint

Gets or sets a value that indicates whether this tool can interact with an "open world" of external entities.

[JsonPropertyName("openWorldHint")]
public bool? OpenWorldHint { get; set; }

Property Value

bool?

true if the tool can interact with an unpredictable or dynamic set of entities (like web search); false if the tool's domain of interaction is closed and well-defined (like memory access); null if unspecified, in which case clients should assume true.

ReadOnlyHint

Gets or sets a value that indicates whether this tool modifies its environment.

[JsonPropertyName("readOnlyHint")]
public bool? ReadOnlyHint { get; set; }

Property Value

bool?

true if the tool only performs read operations without changing state; false if the tool can make modifications to its environment; null if unspecified, in which case clients should assume false.

Title

Gets or sets a human-readable title for the tool that can be displayed to users.

[JsonPropertyName("title")]
public string? Title { get; set; }

Property Value

string