Document title as Draft and restore annotations.title
Follow-up to #109. The introduction of `title` in #109 is still a draft and is not supported in the latest specification, `Version 2025-06-18 (latest)`. In this PR, the README.md will be updated to mention this point and restore the references to the removed `annotations.title`. This aims to inform users that, as of `Version 2025-06-18 (latest)`, the use of `annotations.title` is considered stable. Additionally, separate validation for these parameters could be added. Please refer to the following comment regarding `annotations.title` and `title`: https://github.com/modelcontextprotocol/modelcontextprotocol/pull/663#issuecomment-2963519737
This commit is contained in:
parent
06bf90dd98
commit
b4da129aa0
1 changed files with 13 additions and 10 deletions
|
|
@ -133,6 +133,7 @@ module MCP
|
|||
description: "a mock tool for testing",
|
||||
annotations: {
|
||||
read_only_hint: true,
|
||||
title: "Mock Tool",
|
||||
},
|
||||
) do |_|
|
||||
Tool::Response.new([{ type: "text", content: "OK" }])
|
||||
|
|
@ -142,7 +143,7 @@ module MCP
|
|||
assert_equal tool.title, "Mock Tool"
|
||||
assert_equal tool.description, "a mock tool for testing"
|
||||
assert_equal tool.input_schema, Tool::InputSchema.new
|
||||
assert_equal tool.annotations_value.to_h, { readOnlyHint: true }
|
||||
assert_equal tool.annotations_value.to_h, { readOnlyHint: true, title: "Mock Tool" }
|
||||
end
|
||||
|
||||
# Tests for Tool::Annotations class
|
||||
|
|
|
|||
Loading…
Reference in a new issue