Class: Copilot::MCPLocalServerConfig

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

Overview

MCP local/stdio server configuration.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#args ⇒ Object

Returns the value of attribute args



206
207
208
# File 'lib/copilot/types.rb', line 206

def args
  @args
end

#command ⇒ Object

Returns the value of attribute command



206
207
208
# File 'lib/copilot/types.rb', line 206

def command
  @command
end

#cwd ⇒ Object

Returns the value of attribute cwd



206
207
208
# File 'lib/copilot/types.rb', line 206

def cwd
  @cwd
end

#env ⇒ Object

Returns the value of attribute env



206
207
208
# File 'lib/copilot/types.rb', line 206

def env
  @env
end

#timeout ⇒ Object

Returns the value of attribute timeout



206
207
208
# File 'lib/copilot/types.rb', line 206

def timeout
  @timeout
end

#tools ⇒ Object

Returns the value of attribute tools



206
207
208
# File 'lib/copilot/types.rb', line 206

def tools
  @tools
end

#type ⇒ Object

Returns the value of attribute type



206
207
208
# File 'lib/copilot/types.rb', line 206

def type
  @type
end

Instance Method Details

#to_h ⇒ Object



210
211
212
213
214
215
216
217
# File 'lib/copilot/types.rb', line 210

def to_h
  h = { tools: tools || [], command: command, args: args || [] }
  h[:type] = type if type
  h[:timeout] = timeout if timeout
  h[:env] = env if env
  h[:cwd] = cwd if cwd
  h
end