Class: ClaudeAgentSDK::McpSSEServerConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/claude_agent_sdk/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url:, headers: nil) ⇒ McpSSEServerConfig

Returns a new instance of McpSSEServerConfig.



1534
1535
1536
1537
1538
# File 'lib/claude_agent_sdk/types.rb', line 1534

def initialize(url:, headers: nil)
  @type = 'sse'
  @url = url
  @headers = headers
end

Instance Attribute Details

#headersObject

Returns the value of attribute headers.



1532
1533
1534
# File 'lib/claude_agent_sdk/types.rb', line 1532

def headers
  @headers
end

#typeObject

Returns the value of attribute type.



1532
1533
1534
# File 'lib/claude_agent_sdk/types.rb', line 1532

def type
  @type
end

#urlObject

Returns the value of attribute url.



1532
1533
1534
# File 'lib/claude_agent_sdk/types.rb', line 1532

def url
  @url
end

Instance Method Details

#to_hObject



1540
1541
1542
1543
1544
# File 'lib/claude_agent_sdk/types.rb', line 1540

def to_h
  result = { type: @type, url: @url }
  result[:headers] = @headers if @headers
  result
end