Skip to content

Commit f241b4a

Browse files
authored
Clarify null semantics in ToolAnnotations hint property docs (#1346)
1 parent 741eab7 commit f241b4a

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

src/ModelContextProtocol.Core/Protocol/ToolAnnotations.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ public sealed class ToolAnnotations
3333
/// Gets or sets a value that indicates whether the tool can perform destructive updates to its environment.
3434
/// </summary>
3535
/// <value>
36-
/// The default is <see langword="true"/>.
36+
/// <see langword="true"/> if the tool can perform destructive updates to its environment;
37+
/// <see langword="false"/> if the tool performs only additive updates;
38+
/// <see langword="null"/> if unspecified, in which case clients should assume <see langword="true"/>.
3739
/// </value>
3840
/// <remarks>
39-
/// If <see langword="true"/>, the tool can perform destructive updates to its environment.
40-
/// If <see langword="false"/>, the tool performs only additive updates.
4141
/// This property is most relevant when the tool modifies its environment (ReadOnly = false).
4242
/// </remarks>
4343
[JsonPropertyName("destructiveHint")]
@@ -49,8 +49,8 @@ public sealed class ToolAnnotations
4949
/// </summary>
5050
/// <value>
5151
/// <see langword="true"/> if calling the tool repeatedly with the same arguments
52-
/// has no additional effect on the environment; <see langword="false"/> if it does.
53-
/// The default is <see langword="false"/>.
52+
/// has no additional effect on the environment; <see langword="false"/> if it does;
53+
/// <see langword="null"/> if unspecified, in which case clients should assume <see langword="false"/>.
5454
/// </value>
5555
/// <remarks>
5656
/// This property is most relevant when the tool modifies its environment (ReadOnly = false).
@@ -62,9 +62,9 @@ public sealed class ToolAnnotations
6262
/// Gets or sets a value that indicates whether this tool can interact with an "open world" of external entities.
6363
/// </summary>
6464
/// <value>
65-
/// <see langword="true"/> if the tool can interact with an unpredictable or dynamic set of entities (like web search).
66-
/// <see langword="false"/> if the tool's domain of interaction is closed and well-defined (like memory access).
67-
/// The default is <see langword="true"/>.
65+
/// <see langword="true"/> if the tool can interact with an unpredictable or dynamic set of entities (like web search);
66+
/// <see langword="false"/> if the tool's domain of interaction is closed and well-defined (like memory access);
67+
/// <see langword="null"/> if unspecified, in which case clients should assume <see langword="true"/>.
6868
/// </value>
6969
[JsonPropertyName("openWorldHint")]
7070
public bool? OpenWorldHint { get; set; }
@@ -73,9 +73,9 @@ public sealed class ToolAnnotations
7373
/// Gets or sets a value that indicates whether this tool modifies its environment.
7474
/// </summary>
7575
/// <value>
76-
/// <see langword="true"/> if the tool only performs read operations without changing state.
77-
/// <see langword="false"/> if the tool can make modifications to its environment.
78-
/// The default is <see langword="false"/>.
76+
/// <see langword="true"/> if the tool only performs read operations without changing state;
77+
/// <see langword="false"/> if the tool can make modifications to its environment;
78+
/// <see langword="null"/> if unspecified, in which case clients should assume <see langword="false"/>.
7979
/// </value>
8080
/// <remarks>
8181
/// <para>

0 commit comments

Comments
 (0)