Bug report
Client#tools / Client#list_tools build MCP::Client::Tool objects from
the tools/list response but only pass through name, description,
input_schema, and output_schema — the server's annotations field
(readOnlyHint, destructiveHint, idempotentHint, openWorldHint,
title) is silently dropped even though it's present on the wire.
Reproduction
Register a tool with annotations on the server:
server.define_tool(name: "delete_thing", annotations: { destructive_hint: true, title: "Delete Thing" }) { ... }
Then fetch it from a client:
client.tools.first.annotations
# => NoMethodError: undefined method `annotations'
MCP::Client::Tool has no annotations reader at all, and
Client#list_tools never reads tool["annotations"] out of the raw
response — even though the server always serializes it
(Tool#as_json includes annotations: annotations_value&.to_h).
Impact
There's no way to inspect a tool's annotations from the client side without
bypassing the public API and re-implementing pagination against the private
#request method to get at the raw tools/list response.
Fix
Opened #445 — adds an annotations reader to MCP::Client::Tool (populated
the same way as the existing output_schema) and passes tool["annotations"]
through in Client#list_tools.
Bug report
Client#tools/Client#list_toolsbuildMCP::Client::Toolobjects fromthe
tools/listresponse but only pass throughname,description,input_schema, andoutput_schema— the server'sannotationsfield(
readOnlyHint,destructiveHint,idempotentHint,openWorldHint,title) is silently dropped even though it's present on the wire.Reproduction
Register a tool with annotations on the server:
Then fetch it from a client:
MCP::Client::Toolhas noannotationsreader at all, andClient#list_toolsnever readstool["annotations"]out of the rawresponse — even though the server always serializes it
(
Tool#as_jsonincludesannotations: annotations_value&.to_h).Impact
There's no way to inspect a tool's annotations from the client side without
bypassing the public API and re-implementing pagination against the private
#requestmethod to get at the rawtools/listresponse.Fix
Opened #445 — adds an
annotationsreader toMCP::Client::Tool(populatedthe same way as the existing
output_schema) and passestool["annotations"]through in
Client#list_tools.