Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion test/mcp/server_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4378,7 +4378,10 @@ def server_context
test "modern non-cacheable results carry no cache hints" do
server = Server.new(name: "cache_hints_test", tools: [result_type_tool])

response = server.handle(modern_request(Methods::PING, {}))
# `tools/call` is the non-cacheable example here: the spec types `CallToolResult` as a plain `Result`,
# while the results it types as `CacheableResult` are the discover, list, and read families.
# `ping` cannot stand in for it - SEP-2575 removed that method, so a modern request naming it is refused.
response = server.handle(modern_request(Methods::TOOLS_CALL, { name: "result_type_tool", arguments: {} }))

refute response[:result].key?(:ttlMs)
refute response[:result].key?(:cacheScope)
Expand Down