Skip to content

Comments

Clarify null semantics in ToolAnnotations hint property docs#1346

Merged
jeffhandley merged 2 commits intomainfrom
copilot/update-toolannotations-documentation
Feb 23, 2026
Merged

Clarify null semantics in ToolAnnotations hint property docs#1346
jeffhandley merged 2 commits intomainfrom
copilot/update-toolannotations-documentation

Conversation

Copy link
Contributor

Copilot AI commented Feb 21, 2026

ToolAnnotations hint properties (DestructiveHint, IdempotentHint, OpenWorldHint, ReadOnlyHint) are typed bool? with a .NET default of null, but their XML docs said "The default is true/false" — implying a .NET-level default that doesn't exist. The documented value is the MCP spec's prescribed interpretation when the property is absent.

Changes

  • ToolAnnotations: Updated <value> docs on all four hint properties to enumerate all three states (true, false, null) and explicitly state the spec-prescribed assumption clients should make when the value is null.

Example — DestructiveHint before:

The default is true.

After:

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.

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Copilot AI changed the title [WIP] Update ToolAnnotations documentation for default values Clarify null semantics in ToolAnnotations hint property docs Feb 21, 2026
Copilot AI requested a review from stephentoub February 21, 2026 18:15
@stephentoub stephentoub marked this pull request as ready for review February 21, 2026 18:59
@stephentoub stephentoub added this to the 1.0.0 (GA) milestone Feb 22, 2026
@jeffhandley jeffhandley merged commit f241b4a into main Feb 23, 2026
10 checks passed
@jeffhandley jeffhandley deleted the copilot/update-toolannotations-documentation branch February 23, 2026 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants