Skip to content

Conversation

@koic
Copy link
Member

@koic koic commented Aug 31, 2025

Motivation and Context

Tool annotations were introduced in the "2025-03-26" specification:

Added comprehensive tool annotations for better describing tool behavior,
like whether it is read-only or destructive (PR modelcontextprotocol/modelcontextprotocol#185)

https://modelcontextprotocol.io/specification/2025-03-26/changelog#major-changes

This means they are not supported in the "2024-11-05" specification, so validation errors will be raised for protocol_version: "2024-11-05".

How Has This Been Tested?

Test code is being added.

Breaking Changes

The protocol_version: "2024-11-05" which does not actually support Tool Annotations is specified and an exception occurs when Annotations is used. However this is regarded not as a breaking change but as the expected behavior in this PR. It is based on the same reasoning as the validation in #87.

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

Additional context

@koic koic force-pushed the add_validation_for_tool_annotation branch 2 times, most recently from e5db12d to 0f31211 Compare September 10, 2025 01:15
end
end
unless error_tool_names.empty?
message = "Error occurs in #{error_tool_names.join(", ")}. `annotations` supported by protocol version 2025-03-26 or higher"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

occurred?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! I updated it!

Tool annotations were introduced in the "2025-03-26" specification:

> Added comprehensive tool annotations for better describing tool behavior,
> like whether it is read-only or destructive (PR modelcontextprotocol/modelcontextprotocol#185)

https://modelcontextprotocol.io/specification/2025-03-26/changelog#major-changes

This means they are not supported in the "2024-11-05" specification,
so validation errors will be raised for `protocol_version: "2024-11-05"`.
@koic koic force-pushed the add_validation_for_tool_annotation branch from 0f31211 to 0804828 Compare September 11, 2025 01:49
@atesgoral atesgoral merged commit 5c5f420 into modelcontextprotocol:main Sep 13, 2025
5 checks passed
@koic koic deleted the add_validation_for_tool_annotation branch September 13, 2025 22:33
@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