ruby-sdk/lib/mcp/client/tool.rb
rickreyhsig-wealthbox 3591acdfaa Expose server tool annotations on MCP::Client::Tool
Client#tools/#list_tools built Tool objects without an annotations
field even though the server includes annotations in every
tools/list response. Add the reader and pass the raw hash through,
mirroring how output_schema is already handled.
2026-07-27 09:54:54 -04:00

17 lines
446 B
Ruby

# frozen_string_literal: true
module MCP
class Client
class Tool
attr_reader :name, :description, :input_schema, :output_schema, :annotations
def initialize(name:, description:, input_schema:, output_schema: nil, annotations: nil)
@name = name
@description = description
@input_schema = input_schema
@output_schema = output_schema
@annotations = annotations
end
end
end
end