Class: Copilot::MCPRemoteServerConfig

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

Overview

MCP remote server configuration (HTTP or SSE).

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#headersObject

Returns the value of attribute headers

Returns:

  • (Object)

    the current value of headers



221
222
223
# File 'lib/copilot/types.rb', line 221

def headers
  @headers
end

#timeoutObject

Returns the value of attribute timeout

Returns:

  • (Object)

    the current value of timeout



221
222
223
# File 'lib/copilot/types.rb', line 221

def timeout
  @timeout
end

#toolsObject

Returns the value of attribute tools

Returns:

  • (Object)

    the current value of tools



221
222
223
# File 'lib/copilot/types.rb', line 221

def tools
  @tools
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



221
222
223
# File 'lib/copilot/types.rb', line 221

def type
  @type
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



221
222
223
# File 'lib/copilot/types.rb', line 221

def url
  @url
end

Instance Method Details

#to_hObject



225
226
227
228
229
230
# File 'lib/copilot/types.rb', line 225

def to_h
  h = { tools: tools || [], type: type, url: url }
  h[:timeout] = timeout if timeout
  h[:headers] = headers if headers
  h
end