ruby-sdk/lib/mcp/tool/response.rb
2025-05-29 17:11:40 -04:00

18 lines
319 B
Ruby

# frozen_string_literal: true
module MCP
class Tool
class Response
attr_reader :content, :is_error
def initialize(content, is_error = false)
@content = content
@is_error = is_error
end
def to_h
{ content:, isError: is_error }.compact
end
end
end
end