Skip to content

Conversation

koic
Copy link
Member

@koic koic commented Aug 27, 2025

Motivation and Context

According to the specification, destructive_hint, idempotent_hint, open_world_hint, and read_only_hint of ToolAnnotations are optional with default values:
https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations

This PR sets their default values in accordance with the specification.

Additionally, for readability, the hints have been reordered to follow the specification.

How Has This Been Tested?

Existing tests have been updated.

Breaking Changes

This is a bug fix in the MCP specification and should not be considered a breaking change.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

According to the specification, `destructive_hint`, `idempotent_hint`, `open_world_hint`,
and `read_only_hint` of `ToolAnnotations` are optional with default values:
https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations

This PR sets their default values in accordance with the specification.

Additionally, for readability, the hints have been reordered to follow the specification.
@koic koic force-pushed the add_default_value_to_tool_annotation branch from 923fa85 to cae3054 Compare August 27, 2025 16:14
@koic koic merged commit da471a2 into modelcontextprotocol:main Aug 29, 2025
5 checks passed
@koic koic deleted the add_default_value_to_tool_annotation branch August 29, 2025 07:21
@atesgoral atesgoral mentioned this pull request Sep 14, 2025
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.

2 participants