Merge pull request #247 from koic/fix_default_handler_return_values

Fix default handler return values to comply with MCP spec
This commit is contained in:
Koichi ITO 2026-03-01 17:23:42 +09:00 • committed by GitHub
commit 200826c7fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -99,9 +99,9 @@ module MCP
Methods::LOGGING_SET_LEVEL => method(:configure_logging_level),
# No op handlers for currently unsupported methods
Methods::RESOURCES_SUBSCRIBE => ->(_) {},
Methods::RESOURCES_UNSUBSCRIBE => ->(_) {},
Methods::COMPLETION_COMPLETE => ->(_) {},
Methods::RESOURCES_SUBSCRIBE => ->(_) { {} },
Methods::RESOURCES_UNSUBSCRIBE => ->(_) { {} },
Methods::COMPLETION_COMPLETE => ->(_) { { completion: { values: [], hasMore: false } } },
Methods::ELICITATION_CREATE => ->(_) {},
}
@transport = transport