Advertise only the capability this server actually has
The gem's default_capabilities advertises tools, prompts, resources and
logging. This server has only tools; logging is additionally deprecated as of
2026-07-28 (SEP-2577).
Passing capabilities: { tools: {} } makes server/discover honest. No
listChanged flag, because change notifications at this revision are delivered
over subscriptions/listen and this server does not serve it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
d913f3a150
commit
b8b3289475
1 changed files with 6 additions and 1 deletions
|
|
@ -206,7 +206,12 @@ end
|
|||
server = MCP::Server.new(
|
||||
name: "weather",
|
||||
version: "1.0.0",
|
||||
tools: [GetAlerts, GetForecast]
|
||||
tools: [GetAlerts, GetForecast],
|
||||
# The gem otherwise advertises prompts, resources and logging as well. This
|
||||
# server has only tools, and logging is deprecated as of 2026-07-28
|
||||
# (SEP-2577). No listChanged: change notifications are delivered over
|
||||
# `subscriptions/listen`, which this server does not serve.
|
||||
capabilities: { tools: {} }
|
||||
)
|
||||
|
||||
transport = MCP::Server::Transports::StdioTransport.new(server)
|
||||
|
|
|
|||
Loading…
Reference in a new issue